make workspaces prettier
This commit is contained in:
parent
1f06bf5ee4
commit
4f8c553306
2 changed files with 38 additions and 26 deletions
|
|
@ -4,33 +4,45 @@ 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 {
|
||||||
|
PropertyAnimation {
|
||||||
|
duration: 350
|
||||||
|
easing.type: Easing.InOutBack
|
||||||
|
easing.overshoot: 1.2
|
||||||
|
}
|
||||||
|
}
|
||||||
MouseArea {
|
MouseArea {
|
||||||
id: clickHandler
|
id: clickHandler
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: Qt.PointingHandCursor
|
||||||
acceptedButtons: Qt.LeftButton
|
acceptedButtons: Qt.LeftButton
|
||||||
onClicked: parent.parent.modelData.activate()
|
onClicked: wsContainer.modelData.activate()
|
||||||
}
|
}
|
||||||
|
StyledText {
|
||||||
|
id: wsText
|
||||||
|
anchors.centerIn: parent
|
||||||
|
text: parent.modelData.name
|
||||||
|
color: parent.modelData.active ? Colors.base00 : Colors.base0D
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue