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:
felixzsh
2026-08-26 18:03:51 -05:00
parent a7357e3840
commit 68a75c2ab5
+5 -1
View File
@@ -225,7 +225,10 @@ Panel {
owner: root
bar: root.bar
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
Column {
@@ -295,6 +298,7 @@ Panel {
height: modeButtons.height
Text {
id: filterLabel
anchors.left: parent.left
anchors.verticalCenter: parent.verticalCenter
text: "Filter"