From c466c59e27eea75ac97b1b1a7057afa5e6f3ed55 Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Wed, 24 Aug 2022 13:41:31 +0200 Subject: examples, texteditor: remove the config file, and use default settings instead The qtquickcontrols2.conf file was hard coding the style to be Material. In addition, it was overriding both the Primary and the Foreground color, and sat Theme=System. The latter meant that the application would run in either Light or Dark mode, depending on the OS. And for Dark mode, the assigned colors caused the text to end up with the same color as the background color, and therefore be invisible. The same with the toolbar buttons; since the icon color of a toolbar button map to the primary color, and the primary color was hard-coded to be the same as the background color in the configuration file, the buttons would appear hidden. Since we now have native styles for both macOS and Windows (and Fusion on Linux), overriding the style (and especially the colors) in a config file seems unnecessary. This patch will therefore remove the whole config file, and use the default style settings instead. Fixes: QTBUG-105860 Change-Id: I330fe30746096cf26d8dca343f2c122d7c32c7fe Reviewed-by: Richard Moe Gustavsen Reviewed-by: Oliver Eftevaag Reviewed-by: Mitch Curtis (cherry picked from commit ec582ef0b9e31c5e8fb9d36a17f1e39f593d7455) Reviewed-by: Qt Cherry-pick Bot --- examples/quickcontrols2/texteditor/CMakeLists.txt | 1 - examples/quickcontrols2/texteditor/qtquickcontrols2.conf | 11 ----------- examples/quickcontrols2/texteditor/texteditor.qrc | 1 - 3 files changed, 13 deletions(-) delete mode 100644 examples/quickcontrols2/texteditor/qtquickcontrols2.conf diff --git a/examples/quickcontrols2/texteditor/CMakeLists.txt b/examples/quickcontrols2/texteditor/CMakeLists.txt index 52851f1b9b..f8e41b4f0c 100644 --- a/examples/quickcontrols2/texteditor/CMakeLists.txt +++ b/examples/quickcontrols2/texteditor/CMakeLists.txt @@ -30,7 +30,6 @@ set(texteditor_resource_files "images/qt-logo.png" "qml/+touch/texteditor.qml" "qml/texteditor.qml" - "qtquickcontrols2.conf" "texteditor.html" ) diff --git a/examples/quickcontrols2/texteditor/qtquickcontrols2.conf b/examples/quickcontrols2/texteditor/qtquickcontrols2.conf deleted file mode 100644 index ecac617fcb..0000000000 --- a/examples/quickcontrols2/texteditor/qtquickcontrols2.conf +++ /dev/null @@ -1,11 +0,0 @@ -[Controls] -Style=Material - -[Material] -Primary=White -Foreground=#444444 -Accent=Blue -Theme=System - -[Universal] -Theme=System diff --git a/examples/quickcontrols2/texteditor/texteditor.qrc b/examples/quickcontrols2/texteditor/texteditor.qrc index 8f2da8432b..cdb7225a39 100644 --- a/examples/quickcontrols2/texteditor/texteditor.qrc +++ b/examples/quickcontrols2/texteditor/texteditor.qrc @@ -1,6 +1,5 @@ - qtquickcontrols2.conf images/qt-logo.png fonts/fontello.ttf qml/texteditor.qml -- cgit v1.2.3