Compare commits
3 commits
c5ac7fe773
...
0f7dbb8041
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0f7dbb8041 | ||
|
|
a0ccdc231b | ||
|
|
1d350e35d6 |
3 changed files with 43 additions and 59 deletions
|
|
@ -1,70 +1,42 @@
|
|||
pragma ComponentBehavior: Bound
|
||||
|
||||
import qs.components
|
||||
import qs.config
|
||||
import qs.constants
|
||||
import qs.widgets
|
||||
import QtQuick
|
||||
import Quickshell.Hyprland
|
||||
|
||||
Loader {
|
||||
StyledIconButton {
|
||||
id: root
|
||||
required property HyprlandWorkspace modelData
|
||||
|
||||
active: modelData.id > 0
|
||||
required property HyprlandWorkspace workspace
|
||||
|
||||
sourceComponent: workspace
|
||||
property Component workspace: StyledButton {
|
||||
id: clickable
|
||||
|
||||
onClicked: root.modelData.activate()
|
||||
|
||||
content: Text {
|
||||
id: icon
|
||||
|
||||
font.family: Theme.lucide.font.family
|
||||
font.pixelSize: Dimensions.workspace.iconSize
|
||||
font.bold: true
|
||||
text: Icons.triangle
|
||||
font.bold: true
|
||||
font.pixelSize: 17
|
||||
padding: 8
|
||||
|
||||
color: Theme.palette.basecontent
|
||||
onClicked: root.workspace.activate()
|
||||
|
||||
states: [
|
||||
State {
|
||||
name: "focused"
|
||||
when: root.modelData.focused
|
||||
when: root.workspace.focused
|
||||
PropertyChanges {
|
||||
icon {
|
||||
root {
|
||||
rotation: 180
|
||||
color: clickable.hovered ? Theme.palette.basecontent : Theme.palette.primary
|
||||
color: root.hovered ? Theme.palette.basecontent : Theme.palette.primary
|
||||
}
|
||||
}
|
||||
},
|
||||
State {
|
||||
name: "active"
|
||||
when: root.modelData.active
|
||||
when: root.workspace.active
|
||||
PropertyChanges {
|
||||
icon {
|
||||
root {
|
||||
text: Icons.triangleDashed
|
||||
rotation: 180
|
||||
color: clickable.hovered ? Theme.palette.basecontent : Theme.palette.primary
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
pragma ComponentBehavior: Bound
|
||||
|
||||
import qs.config
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
|
|
@ -12,6 +14,16 @@ RowLayout {
|
|||
|
||||
model: Hyprland.workspaces
|
||||
|
||||
Workspace {}
|
||||
Loader {
|
||||
id: loader
|
||||
required property HyprlandWorkspace modelData
|
||||
|
||||
active: modelData.id > 0
|
||||
|
||||
sourceComponent: workspace
|
||||
property Component workspace: Workspace {
|
||||
workspace: loader.modelData
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,20 +1,20 @@
|
|||
pragma ComponentBehavior: Bound
|
||||
|
||||
import qs.widgets
|
||||
import qs.components
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Services.SystemTray
|
||||
import Quickshell.Widgets
|
||||
import "menu/"
|
||||
|
||||
StyledButton {
|
||||
StyledIconButton {
|
||||
id: root
|
||||
|
||||
property SystemTrayItem trayItem
|
||||
|
||||
onClicked: menu.toggle()
|
||||
|
||||
content: IconImage {
|
||||
contentItem: IconImage {
|
||||
id: icon
|
||||
asynchronous: true
|
||||
implicitSize: 18
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue