fix(window-title): shrink group to content width instead of always filling max

This commit is contained in:
Damocles 2026-04-17 09:31:55 +02:00
parent 69e3711aec
commit 20159f0514
2 changed files with 10 additions and 2 deletions

View file

@ -146,7 +146,9 @@ PanelWindow {
clip: true
visible: M.Modules.windowTitle.enable && M.NiriIpc.focusedTitle !== ""
M.WindowTitle {
width: Math.max(0, centerSection.x - _windowTitleGroup.x - 2 * M.Theme.groupPadding - M.Theme.groupSpacing)
id: _windowTitle
readonly property real _maxWidth: Math.max(0, centerSection.x - _windowTitleGroup.x - 2 * M.Theme.groupPadding - M.Theme.groupSpacing)
width: Math.min(implicitWidth, _maxWidth)
}
}
Item {