Compare commits

..

No commits in common. "0f7dbb804179a9d6ab97cc3832adf813d22f947a" and "c5ac7fe773d989990dda1c23d8752bd71f41a6bd" have entirely different histories.

3 changed files with 59 additions and 43 deletions

View file

@ -1,42 +1,70 @@
import qs.components
pragma ComponentBehavior: Bound
import qs.config
import qs.constants
import qs.widgets
import QtQuick
import Quickshell.Hyprland
StyledIconButton {
Loader {
id: root
required property HyprlandWorkspace modelData
required property HyprlandWorkspace workspace
active: modelData.id > 0
text: Icons.triangle
font.bold: true
font.pixelSize: 17
padding: 8
sourceComponent: workspace
property Component workspace: StyledButton {
id: clickable
onClicked: root.workspace.activate()
onClicked: root.modelData.activate()
states: [
State {
name: "focused"
when: root.workspace.focused
PropertyChanges {
root {
rotation: 180
color: root.hovered ? Theme.palette.basecontent : Theme.palette.primary
content: Text {
id: icon
font.family: Theme.lucide.font.family
font.pixelSize: Dimensions.workspace.iconSize
font.bold: true
text: Icons.triangle
color: Theme.palette.basecontent
states: [
State {
name: "focused"
when: root.modelData.focused
PropertyChanges {
icon {
rotation: 180
color: clickable.hovered ? Theme.palette.basecontent : Theme.palette.primary
}
}
},
State {
name: "active"
when: root.modelData.active
PropertyChanges {
icon {
text: Icons.triangleDashed
rotation: 180
color: clickable.hovered ? Theme.palette.basecontent : Theme.palette.primary
}
}
}
}
},
State {
name: "active"
when: root.workspace.active
PropertyChanges {
root {
text: Icons.triangleDashed
rotation: 180
color: root.hovered ? Theme.palette.basecontent : Theme.palette.primary
]
transitions: Transition {
reversible: true
ParallelAnimation {
RotationAnimation {
duration: 200
easing.type: Easing.InOutCubic
}
ColorAnimation {
duration: 200
easing.type: Easing.OutCubic
}
}
}
}
]
}
}

View file

@ -1,5 +1,3 @@
pragma ComponentBehavior: Bound
import qs.config
import QtQuick
import QtQuick.Layouts
@ -14,16 +12,6 @@ RowLayout {
model: Hyprland.workspaces
Loader {
id: loader
required property HyprlandWorkspace modelData
active: modelData.id > 0
sourceComponent: workspace
property Component workspace: Workspace {
workspace: loader.modelData
}
}
Workspace {}
}
}

View file

@ -1,20 +1,20 @@
pragma ComponentBehavior: Bound
import qs.components
import qs.widgets
import QtQuick
import Quickshell
import Quickshell.Services.SystemTray
import Quickshell.Widgets
import "menu/"
StyledIconButton {
StyledButton {
id: root
property SystemTrayItem trayItem
onClicked: menu.toggle()
contentItem: IconImage {
content: IconImage {
id: icon
asynchronous: true
implicitSize: 18