blob: 0416dfde22ed980a9d3bf89344c15d83ff1574d5 (
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
|
import qs.components
import qs.components.effects
import qs.services
import qs.config
import QtQuick
StyledRect {
id: root
required property int activeWsId
required property Repeater workspaces
required property Item mask
readonly property var currentWs: {
for (let i = 0; i < workspaces.count; i++) {
const ws = workspaces.itemAt(i);
if (ws && ws.isActive)
return ws;
}
}
property real currentSize: currentWs?.size ?? 0
property real offset: currentWs?.y ?? 0
property real size: Config.bar.sizes.innerWidth - Appearance.padding.small * 2
clip: true
y: offset + mask.y
implicitWidth: size
implicitHeight: size
radius: Appearance.rounding.full
color: Colours.palette.m3primary
Colouriser {
source: root.mask
sourceColor: Colours.palette.m3onSurface
colorizationColor: Colours.palette.m3onPrimary
x: 0
y: -parent.offset
implicitWidth: root.mask.implicitWidth
implicitHeight: root.mask.implicitHeight
anchors.horizontalCenter: parent.horizontalCenter
}
Behavior on offset {
EAnim {}
}
component EAnim: Anim {
easing.bezierCurve: Appearance.anim.curves.emphasized
}
}
|