blob: c6761c74fbaf090df694e7247a2cbac5747e0279 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
|
import "root:/widgets"
import "root:/config"
import Quickshell
import QtQuick
Variants {
model: Quickshell.screens
StyledWindow {
id: win
required property ShellScreen modelData
screen: modelData
name: "bar"
width: BarConfig.vertical ? BarConfig.sizes.totalHeight : -1
height: BarConfig.vertical ? -1 : BarConfig.sizes.totalHeight
anchors.top: true
anchors.left: true
anchors.right: true
// Connections {
// target: BarConfig
// function onVerticalChanged(): void {
// win.visible = false;
// if (BarConfig.vertical) {
// win.anchors.right = false;
// win.anchors.bottom = true;
// } else {
// win.anchors.bottom = false;
// win.anchors.right = true;
// }
// win.visible = true;
// }
// }
Preset {
presetName: "pills"
sourceComponent: Pills {}
}
Preset {
presetName: "panel"
sourceComponent: Panel {}
}
}
component Preset: Loader {
id: loader
required property string presetName
anchors.fill: parent
asynchronous: true
active: false
opacity: 0
states: [
State {
name: "visible"
when: BarConfig.preset.name === loader.presetName
PropertyChanges {
loader.opacity: 1
loader.active: true
}
}
]
transitions: [
Transition {
from: ""
to: "visible"
SequentialAnimation {
PropertyAction {}
NumberAnimation {
property: "opacity"
duration: Appearance.anim.durations.large
easing.type: Easing.BezierSpline
easing.bezierCurve: Appearance.anim.curves.standard
}
}
},
Transition {
from: "visible"
to: ""
SequentialAnimation {
NumberAnimation {
property: "opacity"
duration: Appearance.anim.durations.large
easing.type: Easing.BezierSpline
easing.bezierCurve: Appearance.anim.curves.standard
}
PropertyAction {}
}
}
]
}
}
|