Tighten compact status icon spacing

This commit is contained in:
David Heinemeier Hansson
2026-07-17 16:17:49 -07:00
parent 8211b86ac6
commit f8fec7cccf
7 changed files with 14 additions and 8 deletions
+1
View File
@@ -344,6 +344,7 @@ QtObject {
readonly property int iconSlot: root.barToken("icon-slot", 27)
readonly property int iconCanvas: root.barToken("icon-canvas", 16)
readonly property int iconFont: root.barToken("icon-font", 13)
readonly property int statusSlot: root.barToken("status-slot", 18)
}
function refresh() {
+3 -2
View File
@@ -6,6 +6,7 @@ WidgetButton {
id: root
property Component iconComponent: null
property real slotSize: Style.bar.iconSlot
property real opticalSize: Style.bar.iconCanvas
property bool debugOpticalBounds: Quickshell.env("OMARCHY_DEBUG_BAR_ICONS") === "1"
readonly property real opticalCenterErrorX: glyph.visible ? glyph.paintedCenterX - opticalCanvas.width / 2 : 0
@@ -15,8 +16,8 @@ WidgetButton {
labelVisible: false
hasVisualContent: text !== "" || iconComponent !== null
fontSize: Style.bar.iconFont
fixedWidth: vertical ? -1 : Style.bar.iconSlot
fixedHeight: vertical ? Style.bar.iconSlot : -1
fixedWidth: vertical ? -1 : slotSize
fixedHeight: vertical ? slotSize : -1
Item {
id: opticalCanvas
-5
View File
@@ -16,7 +16,6 @@ BarWidget {
property bool indicatorItemHovered: false
readonly property bool alwaysShowIndicators: setting("alwaysShow", false) === true
readonly property bool revealInactiveIndicators: alwaysShowIndicators || indicatorAreaHovered || indicatorItemHovered || (bar && bar.centerSectionRevealHeld === true && bar.centerHoverRevealSuppressed !== true)
readonly property bool hasVisibleIndicators: activeIndicatorIds.length > 0 || revealInactiveIndicators
signal refreshRequested()
@@ -188,8 +187,6 @@ BarWidget {
visible: !root.vertical
spacing: 0
leftPadding: root.hasVisibleIndicators ? Style.spacing.sm : 0
rightPadding: leftPadding
HoverHandler {
onHoveredChanged: root.setIndicatorAreaHovered(hovered)
@@ -232,8 +229,6 @@ BarWidget {
visible: root.vertical
spacing: 0
topPadding: root.hasVisibleIndicators ? Style.spaceReal(1.5) : 0
bottomPadding: topPadding
HoverHandler {
onHoveredChanged: root.setIndicatorAreaHovered(hovered)
@@ -57,6 +57,7 @@ BarWidget {
anchors.fill: parent
bar: root.bar
text: "\uf021"
slotSize: Style.bar.statusSlot
fontSize: Style.font.caption
tooltipText: ""
onPressed: root.runUpdate()
@@ -59,6 +59,7 @@ BarWidget {
anchors.fill: parent
bar: root.bar
text: panelLoader.item ? panelLoader.item.label : ""
slotSize: Style.bar.statusSlot
active: panelLoader.item && panelLoader.item.klass === "active"
// Tooltip suppressed because the panel is the detail view.
tooltipText: ""