Compare commits
No commits in common. "0f7dbb804179a9d6ab97cc3832adf813d22f947a" and "c5ac7fe773d989990dda1c23d8752bd71f41a6bd" have entirely different histories.
0f7dbb8041
...
c5ac7fe773
3 changed files with 59 additions and 43 deletions
|
|
@ -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
|
||||
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
|
||||
font.pixelSize: 17
|
||||
padding: 8
|
||||
text: Icons.triangle
|
||||
|
||||
onClicked: root.workspace.activate()
|
||||
color: Theme.palette.basecontent
|
||||
|
||||
states: [
|
||||
State {
|
||||
name: "focused"
|
||||
when: root.workspace.focused
|
||||
when: root.modelData.focused
|
||||
PropertyChanges {
|
||||
root {
|
||||
icon {
|
||||
rotation: 180
|
||||
color: root.hovered ? Theme.palette.basecontent : Theme.palette.primary
|
||||
color: clickable.hovered ? Theme.palette.basecontent : Theme.palette.primary
|
||||
}
|
||||
}
|
||||
},
|
||||
State {
|
||||
name: "active"
|
||||
when: root.workspace.active
|
||||
when: root.modelData.active
|
||||
PropertyChanges {
|
||||
root {
|
||||
icon {
|
||||
text: Icons.triangleDashed
|
||||
rotation: 180
|
||||
color: root.hovered ? Theme.palette.basecontent : Theme.palette.primary
|
||||
color: clickable.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,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 {}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue