diff --git a/shell/Ui/ChoiceButton.qml b/shell/Ui/ChoiceButton.qml index ea60b621..83ffcbe9 100644 --- a/shell/Ui/ChoiceButton.qml +++ b/shell/Ui/ChoiceButton.qml @@ -21,6 +21,7 @@ Rectangle { // separately from real activeFocus. Visuals match the activeFocus look // (foreground 2px border) so cursor and Tab focus read the same. property bool hasCursor: false + property bool borderlessHighlight: false property color foreground: Color.foreground property color background: Color.background @@ -42,11 +43,12 @@ Rectangle { color: selected ? Qt.rgba(accent.r, accent.g, accent.b, 0.18) - : (mouse.containsMouse ? Style.hotFill : background) + : ((mouse.containsMouse || hasCursor) ? Qt.rgba(foreground.r, foreground.g, foreground.b, 0.12) : background) border.color: selected ? accent - : (activeFocus || hasCursor ? foreground : Qt.rgba(foreground.r, foreground.g, foreground.b, 0.4)) - border.width: selected ? 2 : (activeFocus || hasCursor ? 2 : 1) + : (activeFocus ? foreground : Qt.rgba(foreground.r, foreground.g, foreground.b, 0.4)) + border.width: borderlessHighlight ? (activeFocus ? 2 : 0) + : (selected ? 2 : (activeFocus || hasCursor ? 2 : 1)) Behavior on color { ColorAnimation { duration: 100 } } diff --git a/shell/Ui/CursorPill.qml b/shell/Ui/CursorPill.qml index da299455..fcb877df 100644 --- a/shell/Ui/CursorPill.qml +++ b/shell/Ui/CursorPill.qml @@ -20,6 +20,8 @@ import QtQuick PillButton { id: root + cursorBordered: false + signal hovered(bool isHovered) HoverHandler { diff --git a/shell/Ui/CursorSurface.qml b/shell/Ui/CursorSurface.qml index 477d4e32..92ad4e50 100644 --- a/shell/Ui/CursorSurface.qml +++ b/shell/Ui/CursorSurface.qml @@ -13,11 +13,12 @@ Rectangle { property bool current: false property color foreground: "#cacccc" - property color fill: Qt.rgba(foreground.r, foreground.g, foreground.b, 0.18) + property color fill: Qt.rgba(foreground.r, foreground.g, foreground.b, 0.12) + property color currentFill: fill radius: Style.cornerRadius - color: (hasCursor || current) ? fill : "transparent" - border.width: hasCursor ? 1 : 0 + color: hasCursor ? fill : (current ? currentFill : "transparent") + border.width: 0 border.color: foreground Behavior on color { diff --git a/shell/Ui/PillButton.qml b/shell/Ui/PillButton.qml index 7cdae396..c5634ca5 100644 --- a/shell/Ui/PillButton.qml +++ b/shell/Ui/PillButton.qml @@ -40,6 +40,7 @@ Rectangle { // hits them. The hot/cursor state paints its own 1px border, so changing // this doesn't affect panel-pill visuals. property bool bordered: false + property bool cursorBordered: true activeFocusOnTab: focusable Keys.onReturnPressed: if (focusable) root.clicked() @@ -93,7 +94,7 @@ Rectangle { : hot ? hoverBackground : (active ? activeBackground : background) border.width: _showFocusRing ? Style.focusBorderWidth - : hot ? 1 + : hot ? (cursorBordered ? 1 : 0) : (bordered ? 1 : 0) border.color: _showFocusRing ? Style.focusBorderColor : foreground diff --git a/shell/plugins/bar/widgets/audioPanel.qml b/shell/plugins/bar/widgets/audioPanel.qml index 3b9c974e..cb457b50 100644 --- a/shell/plugins/bar/widgets/audioPanel.qml +++ b/shell/plugins/bar/widgets/audioPanel.qml @@ -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 } diff --git a/shell/plugins/bar/widgets/bluetoothPanel.qml b/shell/plugins/bar/widgets/bluetoothPanel.qml index dcf7b766..f4636ecd 100644 --- a/shell/plugins/bar/widgets/bluetoothPanel.qml +++ b/shell/plugins/bar/widgets/bluetoothPanel.qml @@ -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 diff --git a/shell/plugins/bar/widgets/monitorPanel.qml b/shell/plugins/bar/widgets/monitorPanel.qml index 1dcccdfa..3feb196c 100644 --- a/shell/plugins/bar/widgets/monitorPanel.qml +++ b/shell/plugins/bar/widgets/monitorPanel.qml @@ -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) { diff --git a/shell/plugins/bar/widgets/networkPanel.qml b/shell/plugins/bar/widgets/networkPanel.qml index fcb0b348..32354dfb 100644 --- a/shell/plugins/bar/widgets/networkPanel.qml +++ b/shell/plugins/bar/widgets/networkPanel.qml @@ -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