Restore compact status icon spacing
This commit is contained in:
@@ -44,4 +44,8 @@ BarIconButton {
|
||||
maintainIndicatorReveal: indicatorBlock === "inactive"
|
||||
revealHost: indicatorHost
|
||||
fontSize: Style.font.caption
|
||||
horizontalMargin: 5
|
||||
verticalPadding: 5
|
||||
fixedWidth: -1
|
||||
fixedHeight: -1
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ 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()
|
||||
|
||||
@@ -187,6 +188,8 @@ BarWidget {
|
||||
|
||||
visible: !root.vertical
|
||||
spacing: 0
|
||||
leftPadding: root.hasVisibleIndicators ? Style.spacing.sm : 0
|
||||
rightPadding: leftPadding
|
||||
|
||||
HoverHandler {
|
||||
onHoveredChanged: root.setIndicatorAreaHovered(hovered)
|
||||
@@ -229,6 +232,8 @@ 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"
|
||||
fontSize: Style.font.caption
|
||||
tooltipText: ""
|
||||
onPressed: root.runUpdate()
|
||||
}
|
||||
|
||||
@@ -69,8 +69,8 @@ ShellRoot {
|
||||
fail("vertical icon does not use the shared slot")
|
||||
return
|
||||
}
|
||||
if (verticalIndicator.implicitWidth !== Style.bar.sizeVertical || verticalIndicator.implicitHeight !== Style.bar.iconSlot) {
|
||||
fail("vertical indicator does not use the shared slot")
|
||||
if (verticalIndicator.implicitWidth !== Style.bar.sizeVertical || verticalIndicator.implicitHeight >= Style.bar.iconSlot) {
|
||||
fail("vertical indicator does not retain compact spacing")
|
||||
return
|
||||
}
|
||||
if (verticalIndicator.glyphFontSize !== Style.font.caption) {
|
||||
@@ -81,6 +81,15 @@ ShellRoot {
|
||||
fail("vertical indicator is not optically centered")
|
||||
return
|
||||
}
|
||||
if (horizontalIndicator.implicitWidth >= Style.bar.iconSlot) {
|
||||
fail("horizontal indicator does not retain compact spacing")
|
||||
return
|
||||
}
|
||||
if (horizontalIndicatorPair.implicitWidth >= Style.bar.iconSlot * 2
|
||||
|| verticalIndicatorPair.implicitHeight >= Style.bar.iconSlot * 2) {
|
||||
fail("indicator groups do not retain compact internal spacing")
|
||||
return
|
||||
}
|
||||
console.log("RESULT pass")
|
||||
Qt.quit()
|
||||
})
|
||||
@@ -124,7 +133,16 @@ ShellRoot {
|
||||
iconComponent: Component { Rectangle { width: 12; height: 12 } }
|
||||
}
|
||||
BarIconButton { id: verticalIcon; bar: verticalBar; text: "\uf021" }
|
||||
BarIndicator { id: verticalIndicator; bar: verticalBar; active: true; activeText: "" }
|
||||
Row {
|
||||
id: horizontalIndicatorPair
|
||||
BarIndicator { id: horizontalIndicator; bar: testBar; active: true; activeText: "" }
|
||||
BarIndicator { bar: testBar; active: true; activeText: "" }
|
||||
}
|
||||
Column {
|
||||
id: verticalIndicatorPair
|
||||
BarIndicator { id: verticalIndicator; bar: verticalBar; active: true; activeText: "" }
|
||||
BarIndicator { bar: verticalBar; active: true; activeText: "" }
|
||||
}
|
||||
}
|
||||
QML
|
||||
|
||||
|
||||
Reference in New Issue
Block a user