// A pill beside a device name: how the device is attached, or why it is not // here at all. // // Nine outputs named after their chipsets look alike in a list. Which of them // arrives over the network, over Bluetooth, or is simply away in its case is // the fact that tells them apart, so it is said next to the name rather than // left to be inferred from a subtitle. import QtQuick import qs.config Rectangle { id: root property string text: "" // The token the badge is drawn from -- cyan for network devices, the accent // for Bluetooth, muted for a device that is not present. property color tone: Theme.accent implicitWidth: label.implicitWidth + 14 implicitHeight: 17 radius: Theme.pillRadius color: Theme.alpha(root.tone, 0.10) border.width: 1 border.color: Theme.alpha(root.tone, 0.28) Text { id: label anchors.centerIn: parent text: root.text color: root.tone font.family: Theme.fontFamily font.pixelSize: Math.max(9, Theme.fontSizeSmall - 2) font.weight: Font.DemiBold font.capitalization: Font.AllUppercase font.letterSpacing: 0.5 } }