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.
This commit is contained in:
@@ -22,13 +22,5 @@ Item {
|
||||
|
||||
property int radius: 5
|
||||
|
||||
property bool darkTheme: false
|
||||
|
||||
Settings {
|
||||
property alias darkTheme: item.darkTheme
|
||||
}
|
||||
|
||||
function toggleTheme() {
|
||||
darkTheme = !darkTheme;
|
||||
}
|
||||
property bool darkTheme: Application.styleHints.colorScheme === Qt.Dark
|
||||
}
|
||||
|
||||
@@ -25,12 +25,6 @@ AppWindow {
|
||||
Row {
|
||||
spacing: 5
|
||||
|
||||
AppPrimaryButton {
|
||||
text: "Toggle theme"
|
||||
onClicked: {
|
||||
Theme.toggleTheme();
|
||||
}
|
||||
}
|
||||
AppSecondaryButton {
|
||||
text: "Secondary"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user