summaryrefslogtreecommitdiff
path: root/gui/themes
diff options
context:
space:
mode:
authorkali kaneko (leap communications) <kali@leap.se>2021-12-08 19:51:42 +0100
committerkali kaneko (leap communications) <kali@leap.se>2021-12-08 19:54:35 +0100
commit68e9db0776225168bbb52d164b05b784466a28d8 (patch)
tree525687324ff88b17522bfec5691799d5677dd497 /gui/themes
parent371ee5167ce5e6fccc5a2a159343658f01ba74f7 (diff)
[ui] theming stub
Diffstat (limited to 'gui/themes')
-rw-r--r--gui/themes/Calyx.qml7
-rw-r--r--gui/themes/Riseup.qml7
-rw-r--r--gui/themes/ThemeObject.qml15
-rw-r--r--gui/themes/theme-calyx.js12
-rw-r--r--gui/themes/theme-riseup.js9
5 files changed, 50 insertions, 0 deletions
diff --git a/gui/themes/Calyx.qml b/gui/themes/Calyx.qml
new file mode 100644
index 0000000..50b169c
--- /dev/null
+++ b/gui/themes/Calyx.qml
@@ -0,0 +1,7 @@
+import QtQuick 2.3
+
+import './theme-calyx.js' as Theme
+
+ThemeObject{
+ theme: Theme
+}
diff --git a/gui/themes/Riseup.qml b/gui/themes/Riseup.qml
new file mode 100644
index 0000000..842a41a
--- /dev/null
+++ b/gui/themes/Riseup.qml
@@ -0,0 +1,7 @@
+import QtQuick 2.3
+
+import './theme-riseup.js' as Theme
+
+ThemeObject {
+ theme: Theme
+}
diff --git a/gui/themes/ThemeObject.qml b/gui/themes/ThemeObject.qml
new file mode 100644
index 0000000..bd558e1
--- /dev/null
+++ b/gui/themes/ThemeObject.qml
@@ -0,0 +1,15 @@
+import QtQuick 2.3
+
+QtObject {
+ property var theme;
+ // here we expose any var contained in
+ // the js file. This object can be accessed as the global
+ // customTheme, since it's loaded in main.qml
+ // TODO it'd be real nice if we can implement a fallback mechanism so that any value defaults to the general theme.
+ property string bgColor: theme.bgColor
+ property string fgColor: theme.fgColor
+ property string iconOn: theme.iconOn
+ property string iconOff: theme.iconOff
+ property string iconConnecting: theme.iconConnecting
+ property string iconSplash: theme.iconSplash
+}
diff --git a/gui/themes/theme-calyx.js b/gui/themes/theme-calyx.js
new file mode 100644
index 0000000..ffdb043
--- /dev/null
+++ b/gui/themes/theme-calyx.js
@@ -0,0 +1,12 @@
+.pragma library
+
+const iconOn = "../resources/calyx/calyx-shield-green.png";
+const iconOff = "../resources/calyx/calyx-red-shield.png";
+const iconConnecting = "../resources/calyx/calyx-yellow-shield.png";
+const iconSplash = "../resources/calyx/calyx-hand.png";
+
+const lightGreen = "#F2FFDA";
+const darkGreen = "#D3E9AC";
+
+const bgColor = darkGreen;
+const fgColor = lightGreen;
diff --git a/gui/themes/theme-riseup.js b/gui/themes/theme-riseup.js
new file mode 100644
index 0000000..67fb0e1
--- /dev/null
+++ b/gui/themes/theme-riseup.js
@@ -0,0 +1,9 @@
+.pragma library
+
+const iconOn = "../resources/riseup-icon.svg";
+const iconOff = "../resources/icon-noshield.svg";
+const iconConnecting = "../resources/ravens.gif";
+const iconSplash = "../resources/riseup-icon.svg";
+
+const bgColor = "#f3f3f3";
+const fgColor = "#ffffff";