diff --git a/modules/bar/Ws.qml b/modules/bar/Ws.qml index 489e1d7..8a6ee57 100644 --- a/modules/bar/Ws.qml +++ b/modules/bar/Ws.qml @@ -4,35 +4,47 @@ import QtQuick import QtQuick.Layouts import qs import qs.widgets +import qs.settings BarComponent { id: root required property ShellScreen barScreen - implicitWidth: wsLayout.implicitWidth + wsLayout.spacing * 2 + implicitWidth: wsLayout.implicitWidth + 4 RowLayout { - id: wsLayout - spacing: 15 - anchors.centerIn: parent - Repeater { - model: WindowManager.screenProjection(root.barScreen).windowsets - delegate: Rectangle { - id: wsContainer - required property var modelData - visible: modelData.shouldDisplay - StyledText { - id: wsText - anchors.centerIn: parent - text: parent.modelData.name - color: parent.modelData.active ? Colors.base0D: Colors.base03 - MouseArea { - id: clickHandler - anchors.fill: parent - cursorShape: Qt.PointingHandCursor - acceptedButtons: Qt.LeftButton - onClicked: parent.parent.modelData.activate() - } - } - } - } + id: wsLayout + anchors.centerIn: parent + spacing: 8 + Repeater { + model: WindowManager.screenProjection(root.barScreen).windowsets + delegate: Rectangle { + id: wsContainer + required property var modelData + visible: modelData.shouldDisplay + implicitWidth: modelData.active ? 50 : 20 + implicitHeight: Config.moduleHeight - 4 + color: modelData.active ? Colors.base0D : Colors.activeModuleBg + radius: Config.rounding + Behavior on implicitWidth { + PropertyAnimation { + duration: 350 + easing.type: Easing.InOutBack + easing.overshoot: 1.2 + } + } + 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 + } + } + } } } diff --git a/settings/settings.ini b/settings/settings.ini index b0de28c..329554b 100644 --- a/settings/settings.ini +++ b/settings/settings.ini @@ -3,7 +3,7 @@ barHeight=30 floating=false font=Iosevka fontSize=16 -iconSize=12 +iconSize=18 opacity=1 primaryMon=eDP-1 rounding=16