2026-03-08 13:44:57 +01:00
|
|
|
import Quickshell
|
|
|
|
|
import Quickshell.Wayland
|
|
|
|
|
import QtQuick
|
2026-03-09 10:02:44 +01:00
|
|
|
import QtQuick.Layouts
|
2026-03-08 13:44:57 +01:00
|
|
|
import qs
|
|
|
|
|
import qs.widgets
|
|
|
|
|
import qs.settings
|
|
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
|
id: root
|
|
|
|
|
property var activeWindow: ToplevelManager.activeToplevel
|
|
|
|
|
property bool active: activeWindow ? activeWindow.activated ? true : false : false
|
|
|
|
|
radius: Settings.config.rounding
|
2026-03-11 16:51:20 +01:00
|
|
|
color: active ? Colors.surface_container : "transparent"
|
2026-03-08 13:44:57 +01:00
|
|
|
implicitHeight: Settings.config.barHeight / 2 + 6
|
2026-03-09 10:02:44 +01:00
|
|
|
implicitWidth: titleText.width + 14
|
|
|
|
|
RowLayout {
|
2026-03-08 13:44:57 +01:00
|
|
|
anchors.centerIn: parent
|
2026-03-09 10:02:44 +01:00
|
|
|
CText {
|
|
|
|
|
id: titleText
|
|
|
|
|
Layout.maximumWidth: 300
|
|
|
|
|
text: root.activeWindow ? root.activeWindow.activated ? root.activeWindow.title : "" : ""
|
|
|
|
|
elide: Text.ElideRight // Allows wrapping
|
|
|
|
|
}
|
2026-03-08 13:44:57 +01:00
|
|
|
}
|
|
|
|
|
}
|