aboutsummaryrefslogtreecommitdiffstats
path: root/Config/Config.qml
diff options
context:
space:
mode:
Diffstat (limited to 'Config/Config.qml')
-rw-r--r--Config/Config.qml23
1 files changed, 23 insertions, 0 deletions
diff --git a/Config/Config.qml b/Config/Config.qml
new file mode 100644
index 0000000..41da703
--- /dev/null
+++ b/Config/Config.qml
@@ -0,0 +1,23 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// Copyright (C) 2024 Automotive Grade Linux
+// SPDX-License-Identifier: GPL-3.0+
+
+pragma Singleton
+import QtQuick
+
+QtObject {
+ enum Theme {
+ Light,
+ Dark
+ }
+
+ property int activeTheme : Config.Theme.Dark
+
+ readonly property bool isMobileTarget : Qt.platform.os === "android" || Qt.platform.os === "ios"
+ readonly property color mainColor : activeTheme ? "#09102B" : "#FFFFFF"
+ readonly property color secondaryColor : activeTheme ? "#FFFFFF" : "#09102B"
+
+ function iconSource(fileName, addSuffix = true) {
+ return `qrc:/qt/qml/MediaControls/icons/${fileName}${activeTheme === Config.Theme.Dark && addSuffix ? "_Dark.svg" : ".svg"}`
+ }
+}