This repository has been archived by the owner on Mar 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
CommonStyle.qml
62 lines (55 loc) · 1.54 KB
/
CommonStyle.qml
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
import QtQuick 2.8
import QtQuick.Controls 2.1
import QtQuick.Controls.Material 2.1
import QtQuick.Controls.Universal 2.1
import de.skycoder42.quickextras 2.0
Control {
readonly property int theme: {
if(QuickExtras.currentStyle === "Material")
return Material.theme;
else if(QuickExtras.currentStyle === "Universal")
return Universal.theme;
else
return 0;
}
readonly property color accent: {
if(QuickExtras.currentStyle === "Material")
return Material.accent;
else if(QuickExtras.currentStyle === "Universal")
return Universal.accent;
else
return "black";
}
readonly property color primary: {
if(QuickExtras.currentStyle === "Material")
return Material.primary;
else if(QuickExtras.currentStyle === "Universal")
return Universal.background;
else
return "white";
}
readonly property color sBackground: {
if(QuickExtras.currentStyle === "Material")
return Material.background;
else if(QuickExtras.currentStyle === "Universal")
return Universal.background;
else
return "white";
}
readonly property color foreground: {
if(QuickExtras.currentStyle === "Material")
return Material.foreground;
else if(QuickExtras.currentStyle === "Universal")
return Universal.foreground;
else
return "black";
}
readonly property int elevation: {
if(QuickExtras.currentStyle === "Material")
return Material.elevation;
else
return 1;
}
readonly property bool isMaterial: QuickExtras.currentStyle === "Material"
readonly property bool isUniversal: QuickExtras.currentStyle === "Universal"
}