Files
qt-designsystem/Theme.qml
T
talksik 4de7101200 fix: use system theme to prevent color mismatch
The problem stems from using something like QtQuick.Controls.iOS in
certain views, which will follow the operating system level control.
Thus, if our app theme is dark and the human's ios system theme is
light, the text on a iOS.Menu will be white from our palette on top of a
light mode background.
2025-04-16 12:27:31 -07:00

27 lines
1.1 KiB
QML

pragma Singleton
import QtCore
import QtQuick
// based on https://colorhunt.co/palette/181c143c3d37697565ecdfcc
Item {
id: item
property color background: darkTheme ? "#1C1C1E" : "#D7DCDD"
property color card: darkTheme ? "#2C2C2E" : "#e4e9eb"
property color secondaryBackground: darkTheme ? "#4A4B4C" : "#e4e9eb"
property color accent: "#697565"
property color muted: darkTheme ? "#EBEBF5" : Qt.rgba(0, 0, 0, 0.4)
property color foreground: darkTheme ? "#FFFFFF" : "#000000"
property color softBorder: darkTheme ? "#38383A" : "#C6C6C8"
property color primaryText: darkTheme ? "#FFFFFF" : "#000000"
property color secondaryText: darkTheme ? "#EBEBF5" : "#3C3C43"
property color caption: darkTheme ? "#EBEBF5" : "#3C3C43"
property color separator: darkTheme ? "#38383A" : "#C6C6C8"
property color highlight: darkTheme ? "#374151" : "#c6cbcc"
property color placeholderText: darkTheme ? Qt.rgba(1, 1, 1, 0.4) : Qt.rgba(0, 0, 0, 0.3)
property int radius: 5
property bool darkTheme: Application.styleHints.colorScheme === Qt.Dark
}