blob: 75550c3a2bb6f221f1cd843230c15eaf2e5a6e1d (
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
|
pragma Singleton
import qs.services
import qs.config
import Quickshell
import QtQuick
Singleton {
id: root
function create(parent: Item, props: var): void {
controlCenter.createObject(parent ?? dummy, props);
}
QtObject {
id: dummy
}
Component {
id: controlCenter
FloatingWindow {
id: win
property alias active: cc.active
property alias navExpanded: cc.navExpanded
color: Colours.palette.m3surface
onVisibleChanged: {
if (!visible)
destroy();
}
minimumSize.width: 1000
minimumSize.height: 600
implicitWidth: cc.implicitWidth
implicitHeight: cc.implicitHeight
ControlCenter {
id: cc
anchors.fill: parent
screen: win.screen
floating: true
function close(): void {
win.visible = false;
}
}
Behavior on color {
ColorAnimation {
duration: Appearance.anim.durations.normal
easing.type: Easing.BezierSpline
easing.bezierCurve: Appearance.anim.curves.standard
}
}
}
}
}
|