make workspaces prettier

This commit is contained in:
lucy 2026-08-26 19:58:25 +02:00
commit 4f8c553306
2 changed files with 38 additions and 26 deletions

View file

@ -4,35 +4,47 @@ import QtQuick
import QtQuick.Layouts import QtQuick.Layouts
import qs import qs
import qs.widgets import qs.widgets
import qs.settings
BarComponent { BarComponent {
id: root id: root
required property ShellScreen barScreen required property ShellScreen barScreen
implicitWidth: wsLayout.implicitWidth + wsLayout.spacing * 2 implicitWidth: wsLayout.implicitWidth + 4
RowLayout { RowLayout {
id: wsLayout id: wsLayout
spacing: 15 anchors.centerIn: parent
anchors.centerIn: parent spacing: 8
Repeater { Repeater {
model: WindowManager.screenProjection(root.barScreen).windowsets model: WindowManager.screenProjection(root.barScreen).windowsets
delegate: Rectangle { delegate: Rectangle {
id: wsContainer id: wsContainer
required property var modelData required property var modelData
visible: modelData.shouldDisplay visible: modelData.shouldDisplay
StyledText { implicitWidth: modelData.active ? 50 : 20
id: wsText implicitHeight: Config.moduleHeight - 4
anchors.centerIn: parent color: modelData.active ? Colors.base0D : Colors.activeModuleBg
text: parent.modelData.name radius: Config.rounding
color: parent.modelData.active ? Colors.base0D: Colors.base03 Behavior on implicitWidth {
MouseArea { PropertyAnimation {
id: clickHandler duration: 350
anchors.fill: parent easing.type: Easing.InOutBack
cursorShape: Qt.PointingHandCursor easing.overshoot: 1.2
acceptedButtons: Qt.LeftButton }
onClicked: parent.parent.modelData.activate() }
} MouseArea {
} id: clickHandler
} anchors.fill: parent
} cursorShape: Qt.PointingHandCursor
acceptedButtons: Qt.LeftButton
onClicked: wsContainer.modelData.activate()
}
StyledText {
id: wsText
anchors.centerIn: parent
text: parent.modelData.name
color: parent.modelData.active ? Colors.base00 : Colors.base0D
}
}
}
} }
} }

View file

@ -3,7 +3,7 @@ barHeight=30
floating=false floating=false
font=Iosevka font=Iosevka
fontSize=16 fontSize=16
iconSize=12 iconSize=18
opacity=1 opacity=1
primaryMon=eDP-1 primaryMon=eDP-1
rounding=16 rounding=16