More tweaking and standardization

This commit is contained in:
David Heinemeier Hansson
2026-05-18 15:54:14 +02:00
parent acf617e05e
commit f3ba505558
9 changed files with 41 additions and 29 deletions
+11 -5
View File
@@ -96,8 +96,11 @@ Item {
property string focusSection: "output"
property int selectedIndex: -1
readonly property color activeFill: bar
? Qt.rgba(bar.foreground.r, bar.foreground.g, bar.foreground.b, 0.12)
readonly property color hoverFill: bar
? Qt.rgba(bar.foreground.r, bar.foreground.g, bar.foreground.b, 0.08)
: "transparent"
readonly property color selectedFill: bar
? Qt.rgba(bar.foreground.r, bar.foreground.g, bar.foreground.b, 0.18)
: "transparent"
function sectionCount(section) {
@@ -692,7 +695,8 @@ Item {
onHasCursorChanged: if (hasCursor) root.ensureCursorVisible(sinkRow)
current: isActive
foreground: root.bar.foreground
fill: root.activeFill
fill: root.hoverFill
currentFill: root.selectedFill
implicitHeight: sinkInner.implicitHeight + 10
Row {
@@ -758,7 +762,8 @@ Item {
onHasCursorChanged: if (hasCursor) root.ensureCursorVisible(sourceRow)
current: isActive
foreground: root.bar.foreground
fill: root.activeFill
fill: root.hoverFill
currentFill: root.selectedFill
implicitHeight: sourceInner.implicitHeight + 10
Row {
@@ -828,7 +833,8 @@ Item {
hasCursor: root.focusSection === "streams" && root.selectedIndex === rowIndex
onHasCursorChanged: if (hasCursor) root.ensureCursorVisible(streamRow)
foreground: root.bar.foreground
fill: root.activeFill
fill: root.hoverFill
currentFill: root.selectedFill
implicitHeight: streamColumn.implicitHeight + 8
Column {
+7 -4
View File
@@ -108,8 +108,11 @@ Item {
// same device across reorders rather than the slot it used to occupy.
property string focusedKnownAddress: ""
readonly property color activeFill: bar
? Qt.rgba(bar.foreground.r, bar.foreground.g, bar.foreground.b, 0.12)
readonly property color hoverFill: bar
? Qt.rgba(bar.foreground.r, bar.foreground.g, bar.foreground.b, 0.08)
: "transparent"
readonly property color selectedFill: bar
? Qt.rgba(bar.foreground.r, bar.foreground.g, bar.foreground.b, 0.18)
: "transparent"
function sectionCount(section) {
@@ -557,8 +560,8 @@ Item {
onHasCursorChanged: if (hasCursor) root.ensureCursorVisible(row)
current: isConnected
foreground: root.bar.foreground
fill: root.activeFill
currentFill: root.activeFill
fill: root.hoverFill
currentFill: root.selectedFill
// 0 idle, 1 connecting, 2 disconnecting, 3 pairing, 4 failed.
property int pendingAction: 0
+7 -5
View File
@@ -498,20 +498,22 @@ Item {
Repeater {
model: root.scaleValues
ChoiceButton {
CursorPill {
required property string modelData
required property int index
width: (panelColumn.width - 30) / 6
text: modelData + "x"
foreground: root.bar.foreground
background: root.bar.background
accent: root.bar.foreground
background: "transparent"
tooltipBackground: root.bar.background
tooltipForeground: root.bar.foreground
fontFamily: root.bar.fontFamily
fontSize: 11
selected: root.normalizeScale(root.monitorScale) === root.normalizeScale(modelData)
horizontalPadding: 0
verticalPadding: 6
active: 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) {
+4 -3
View File
@@ -68,7 +68,8 @@ 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.12) : "transparent"
readonly property color hoverFill: bar ? Qt.rgba(bar.foreground.r, bar.foreground.g, bar.foreground.b, 0.08) : "transparent"
readonly property color selectedFill: bar ? Qt.rgba(bar.foreground.r, bar.foreground.g, bar.foreground.b, 0.18) : "transparent"
// The panel below is its own layer-shell with Exclusive keyboard focus,
// so Hyprland grants focus when the surface is mapped (popupOpen flips
@@ -577,7 +578,6 @@ iwctl station "$station" get-networks rssi-dbms 2>/dev/null \\
text: root.icon
horizontalMargin: 8.5
rightExtraMargin: 2
tooltipText: root.networkTooltip()
onPressed: function(b) {
if (b === Qt.RightButton) root.launchImpala()
@@ -956,7 +956,8 @@ iwctl station "$station" get-networks rssi-dbms 2>/dev/null \\
hasCursor: isSelected
current: isConnected
foreground: root.bar.foreground
fill: root.activeFill
fill: root.hoverFill
currentFill: root.selectedFill
// Gate on the matching *Kind/*Reason being non-empty so a hidden-SSID
// row (ssid == "") doesn't match the "" defaults of actionSsid etc.
readonly property bool isBusy: root.actionKind !== "" && root.actionSsid === (net ? net.ssid : "")