1
0
Fork 0
mirror of https://github.com/pnx/dotfiles synced 2026-11-25 23:26:48 +01:00

quickshell: fix window title overflow

This commit is contained in:
Henrik Hautakoski 2026-11-21 15:35:35 +01:00
parent 1653148595
commit e5d19bd3ab
2 changed files with 28 additions and 13 deletions

View file

@ -1,6 +1,7 @@
import Quickshell
import Quickshell.Hyprland
import QtQuick
import QtQuick.Layouts
Item {
property int paddingY: 4
@ -11,6 +12,8 @@ Item {
implicitWidth: label.implicitWidth + root.paddingX
implicitHeight: label.implicitHeight + root.paddingY
Layout.minimumWidth: 0
Layout.fillWidth: true
SystemPalette { id: pal }
@ -22,8 +25,11 @@ Item {
Text {
id: label
anchors.centerIn: parent
width: Math.max(0, parent.width - root.paddingX)
text: Hyprland.activeToplevel?.title ?? ""
// text: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
color: pal.text
elide: Text.ElideRight
}
}
}