From 139d70701cfe4b015fda1fb5acf329ace127567f Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Sat, 30 Sep 2023 21:57:03 +0300 Subject: [PATCH] fix(qt): patch qt to make placeholders differ from actual text Using a part of this patch https://bugreports.qt.io/browse/QTBUG-92199?focusedId=669719&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-669719 --- depends/packages/qt.mk | 2 ++ depends/patches/qt/fix_qt_placeholders.patch | 10 ++++++++++ 2 files changed, 12 insertions(+) create mode 100644 depends/patches/qt/fix_qt_placeholders.patch diff --git a/depends/packages/qt.mk b/depends/packages/qt.mk index 737a8c9159423..1d22cb0de9994 100644 --- a/depends/packages/qt.mk +++ b/depends/packages/qt.mk @@ -11,6 +11,7 @@ $(package)_patches = qt.pro $(package)_patches += qttools_src.pro $(package)_patches += mac-qmake.conf $(package)_patches += fix_qt_pkgconfig.patch +$(package)_patches += fix_qt_placeholders.patch $(package)_patches += no-xlib.patch $(package)_patches += dont_hardcode_x86_64.patch $(package)_patches += fix_montery_include.patch @@ -245,6 +246,7 @@ define $(package)_preprocess_cmds cp $($(package)_patch_dir)/qttools_src.pro qttools/src/src.pro && \ patch -p1 -i $($(package)_patch_dir)/dont_hardcode_pwd.patch && \ patch -p1 -i $($(package)_patch_dir)/fix_qt_pkgconfig.patch && \ + patch -p1 -i $($(package)_patch_dir)/fix_qt_placeholders.patch && \ patch -p1 -i $($(package)_patch_dir)/fix_android_jni_static.patch && \ patch -p1 -i $($(package)_patch_dir)/no-xlib.patch && \ patch -p1 -i $($(package)_patch_dir)/dont_hardcode_x86_64.patch && \ diff --git a/depends/patches/qt/fix_qt_placeholders.patch b/depends/patches/qt/fix_qt_placeholders.patch new file mode 100644 index 0000000000000..79131ae22a2b9 --- /dev/null +++ b/depends/patches/qt/fix_qt_placeholders.patch @@ -0,0 +1,10 @@ +--- old/qtbase/src/widgets/styles/qstylesheetstyle.cpp ++++ new/qtbase/src/widgets/styles/qstylesheetstyle.cpp +@@ -1465,7 +1465,6 @@ void QRenderRule::configurePalette(QPalette *p, QPalette::ColorGroup cg, const Q + p->setBrush(cg, w->foregroundRole(), pal->foreground); + p->setBrush(cg, QPalette::WindowText, pal->foreground); + p->setBrush(cg, QPalette::Text, pal->foreground); +- p->setBrush(cg, QPalette::PlaceholderText, pal->foreground); + } + if (pal->selectionBackground.style() != Qt::NoBrush) + p->setBrush(cg, QPalette::Highlight, pal->selectionBackground);