aboutsummaryrefslogtreecommitdiffstats
path: root/Config/Config.qml
blob: 41da703ae4f594ff68f18299c735536c2f29fd73 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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"}`
    }
}