Align vertical bar widgets to the icon grid

This commit is contained in:
David Heinemeier Hansson
2026-07-17 16:03:49 -07:00
parent 0c8c4ea26a
commit 22791803ed
5 changed files with 75 additions and 15 deletions
+3 -7
View File
@@ -37,7 +37,7 @@ BarWidget {
}
visible: panelLoader.item && panelLoader.item.label !== ""
implicitWidth: bar && bar.vertical ? button.implicitWidth : button.implicitWidth + Style.spacing.labelGap
implicitWidth: button.implicitWidth
implicitHeight: button.implicitHeight
onBarChanged: injectPanel()
@@ -54,16 +54,12 @@ BarWidget {
}
}
WidgetButton {
BarIconButton {
id: button
anchors.verticalCenter: parent.verticalCenter
x: bar && bar.vertical ? Math.round((parent.width - width) / 2) : 0
width: implicitWidth
height: implicitHeight
anchors.fill: parent
bar: root.bar
text: panelLoader.item ? panelLoader.item.label : ""
active: panelLoader.item && panelLoader.item.klass === "active"
horizontalMargin: 2.5
// Tooltip suppressed because the panel is the detail view.
tooltipText: ""