Panel tweaks

This commit is contained in:
David Heinemeier Hansson
2026-05-18 15:30:29 +02:00
parent 0fe985b45d
commit cddc18b1cd
8 changed files with 29 additions and 24 deletions
+11 -11
View File
@@ -97,7 +97,7 @@ Item {
property int selectedIndex: -1
readonly property color activeFill: bar
? Qt.rgba(bar.foreground.r, bar.foreground.g, bar.foreground.b, 0.18)
? Qt.rgba(bar.foreground.r, bar.foreground.g, bar.foreground.b, 0.12)
: "transparent"
function sectionCount(section) {
@@ -450,7 +450,7 @@ Item {
hasCursor: root.focusSection === "output" && root.selectedIndex === -1
onHasCursorChanged: if (hasCursor) root.ensureCursorVisible(outputSliderRow)
foreground: root.bar.foreground
fill: root.activeFill
fill: "transparent"
Row {
id: outputSliderInner
@@ -567,7 +567,7 @@ Item {
hasCursor: root.focusSection === "input" && root.selectedIndex === -1
onHasCursorChanged: if (hasCursor) root.ensureCursorVisible(inputSliderRow)
foreground: root.bar.foreground
fill: root.activeFill
fill: "transparent"
Row {
id: inputSliderInner
@@ -700,8 +700,8 @@ Item {
anchors.left: parent.left
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
anchors.leftMargin: 10
anchors.rightMargin: 10
anchors.leftMargin: 6
anchors.rightMargin: 6
spacing: 8
Text {
@@ -709,7 +709,7 @@ Item {
color: root.bar.foreground
font.family: root.bar.fontFamily
font.pixelSize: 14
width: 18
width: 22
horizontalAlignment: Text.AlignHCenter
anchors.verticalCenter: parent.verticalCenter
}
@@ -720,7 +720,7 @@ Item {
font.family: root.bar.fontFamily
font.pixelSize: 12
elide: Text.ElideRight
width: parent.width - 18 - 14 - 16
width: parent.width - 22 - 14 - 16
anchors.verticalCenter: parent.verticalCenter
}
@@ -766,8 +766,8 @@ Item {
anchors.left: parent.left
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
anchors.leftMargin: 10
anchors.rightMargin: 10
anchors.leftMargin: 6
anchors.rightMargin: 6
spacing: 8
Text {
@@ -775,7 +775,7 @@ Item {
color: root.bar.foreground
font.family: root.bar.fontFamily
font.pixelSize: 14
width: 18
width: 22
horizontalAlignment: Text.AlignHCenter
anchors.verticalCenter: parent.verticalCenter
}
@@ -786,7 +786,7 @@ Item {
font.family: root.bar.fontFamily
font.pixelSize: 12
elide: Text.ElideRight
width: parent.width - 18 - 14 - 16
width: parent.width - 22 - 14 - 16
anchors.verticalCenter: parent.verticalCenter
}
+2 -4
View File
@@ -85,7 +85,7 @@ Item {
property string focusedKnownAddress: ""
readonly property color activeFill: bar
? Qt.rgba(bar.foreground.r, bar.foreground.g, bar.foreground.b, 0.18)
? Qt.rgba(bar.foreground.r, bar.foreground.g, bar.foreground.b, 0.12)
: "transparent"
function sectionCount(section) {
@@ -374,7 +374,6 @@ Item {
tooltipText: !root.adapter ? "" : !root.adapter.enabled ? "Bluetooth is off"
: root.adapter.discovering ? "Stop scanning" : "Scan for devices"
pillEnabled: root.adapter !== null && root.adapter.enabled
active: root.adapter && root.adapter.discovering
onActivated: if (root.adapter) root.adapter.discovering = !root.adapter.discovering
}
@@ -389,7 +388,6 @@ Item {
pillIndex: 2
iconText: root.adapter && root.adapter.enabled ? "󰂯" : "󰂲"
tooltipText: root.adapter && root.adapter.enabled ? "Turn Bluetooth off" : "Turn Bluetooth on"
active: root.adapter && root.adapter.enabled
onActivated: if (root.adapter) root.adapter.enabled = !root.adapter.enabled
}
}
@@ -514,7 +512,7 @@ Item {
onHasCursorChanged: if (hasCursor) root.ensureCursorVisible(row)
current: isConnected
foreground: root.bar.foreground
fill: root.activeFill
fill: isConnected ? root.activeFill : "transparent"
// 0 idle, 1 connecting, 2 disconnecting, 3 pairing, 4 failed.
property int pendingAction: 0
+2 -1
View File
@@ -414,7 +414,7 @@ Item {
hasCursor: root.focusSection === "brightness" && root.selectedIndex === -1
onHasCursorChanged: if (hasCursor) root.ensureCursorVisible(brightnessRow)
foreground: root.bar.foreground
fill: Qt.rgba(root.bar.foreground.r, root.bar.foreground.g, root.bar.foreground.b, 0.18)
fill: "transparent"
Row {
id: brightnessInner
@@ -511,6 +511,7 @@ Item {
fontSize: 11
selected: root.normalizeScale(root.monitorScale) === root.normalizeScale(modelData)
hasCursor: root.focusSection === "scale" && root.selectedIndex === index
borderlessHighlight: true
onClicked: root.setScale(modelData)
onHovered: function(h) {
if (h) {
+1 -1
View File
@@ -68,7 +68,7 @@ Item {
// Mouse hover and keyboard nav both mutate this state at the root; items
// never read containsMouse for visuals. See CursorSurface for the
// shared chrome (fill / border) shared by NetworkRow and DnsProviderPill.
readonly property color activeFill: bar ? Qt.rgba(bar.foreground.r, bar.foreground.g, bar.foreground.b, 0.18) : "transparent"
readonly property color activeFill: bar ? Qt.rgba(bar.foreground.r, bar.foreground.g, bar.foreground.b, 0.12) : "transparent"
// The panel below is its own layer-shell with Exclusive keyboard focus,
// so Hyprland grants focus when the surface is mapped (popupOpen flips