fix(ui): auto-size config panel to content width
The config panel used a fixed contentWidth of Style.space(250), the narrowest of all omarchy panels. With a wider font the Filter row (label "Filter" plus the All keys / Bindings buttons) no longer fit and the label overlapped the buttons. Derive contentWidth from the Filter row's implicit width (label + gap + buttons) plus padding and borders, capped to the available screen via fittedContentWidth, so the panel grows or shrinks with the font.
This commit is contained in:
@@ -225,7 +225,10 @@ Panel {
|
|||||||
owner: root
|
owner: root
|
||||||
bar: root.bar
|
bar: root.bar
|
||||||
open: root.opened
|
open: root.opened
|
||||||
contentWidth: Style.space(250)
|
contentWidth: panel.fittedContentWidth(
|
||||||
|
Math.max(Style.space(250),
|
||||||
|
filterLabel.implicitWidth + Style.spacing.xl + modeButtons.implicitWidth
|
||||||
|
+ panel.padding * 2 + Border.left(panel.borderSpec) + Border.right(panel.borderSpec)))
|
||||||
contentHeight: menuColumn.implicitHeight + panel.padding * 2
|
contentHeight: menuColumn.implicitHeight + panel.padding * 2
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
@@ -295,6 +298,7 @@ Panel {
|
|||||||
height: modeButtons.height
|
height: modeButtons.height
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
|
id: filterLabel
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
text: "Filter"
|
text: "Filter"
|
||||||
|
|||||||
Reference in New Issue
Block a user