From 68e9db0776225168bbb52d164b05b784466a28d8 Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Wed, 8 Dec 2021 19:51:42 +0100 Subject: [ui] theming stub --- gui/themes/Calyx.qml | 7 +++++++ gui/themes/Riseup.qml | 7 +++++++ gui/themes/ThemeObject.qml | 15 +++++++++++++++ gui/themes/theme-calyx.js | 12 ++++++++++++ gui/themes/theme-riseup.js | 9 +++++++++ 5 files changed, 50 insertions(+) create mode 100644 gui/themes/Calyx.qml create mode 100644 gui/themes/Riseup.qml create mode 100644 gui/themes/ThemeObject.qml create mode 100644 gui/themes/theme-calyx.js create mode 100644 gui/themes/theme-riseup.js (limited to 'gui/themes') 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"; -- cgit v1.2.3