View Issue Details

IDProjectCategoryView StatusLast Update
0017279ScribusUser Interfacepublic2025-02-27 14:10
Reporternitramr Assigned To 
PrioritynormalSeveritytweakReproducibilityalways
Status closedResolutionwon't fix 
PlatformDesktop PCOSUbuntuOS Version24.04 64-bit
Product Version1.6.2 
Target Version1.6.3.svn 
Summary0017279: Workaround for QPalette bug
DescriptionFirst of all, this is not a Scribus bug.

Since Qt 6.5 introduced support for dark themes, changes have been made to the underlying style system.

As a result, the entire UI with the Fusion theme under Gnome is much too bright. Also, the disabled color is no longer displayed correctly.
See my bug report here: https://bugreports.qt.io/browse/QTBUG-126208

It doesn't look like the bug will be fixed anytime soon, hence this temporary patch.

The bug is only visible if Scribus is compiled with Qt 6.5+
TagsNo tags attached.
PatchYes

Relationships

related to 0017181 assignednitramr Grey side panels 
related to 0017391 resolvednitramr Add Dark/Light theme switch to override automatic mode 

Activities

nitramr

2024-09-22 19:24

developer  

qpalette_fix_2024-09-22_01.patch (993 bytes)   
Index: scribus/scribusapp.cpp
===================================================================
--- scribus/scribusapp.cpp	(Revision 26310)
+++ scribus/scribusapp.cpp	(Arbeitskopie)
@@ -33,6 +33,7 @@
 #include <QLocale>
 #include <QString>
 #include <QStringList>
+#include <QStyleHints>
 #include <QTextCodec>
 #include <QTextStream>
 #include <QTranslator>
@@ -347,6 +348,18 @@
 
 int ScribusQApp::init()
 {
+
+#if (defined Q_OS_LINUX && QT_VERSION >= QT_VERSION_CHECK(6, 5, 0))
+	// As long as this bug persists, we have to repair the palette ourselves
+	// https://bugreports.qt.io/browse/QTBUG-126208
+	// See color values of fusion palette here: https://github.com/qt/qtbase/blob/dev/src/gui/kernel/qplatformtheme.cpp#L356
+	if (this->styleHints()->colorScheme() == Qt::ColorScheme::Light && this->style()->name() == "fusion")
+	{
+		QPalette pal(QColor(239, 239, 239));
+		this->setPalette(pal);
+	}
+#endif
+
 	m_ScCore = new ScribusCore();
 	Q_CHECK_PTR(m_ScCore);
 	if (!m_ScCore)

nitramr

2025-02-27 14:09

developer   ~0052130

Obsolete by https://bugs.scribus.net/view.php?id=17391

Issue History

Date Modified Username Field Change
2024-09-22 19:24 nitramr New Issue
2024-09-22 19:24 nitramr File Added: qpalette_fix_2024-09-22_01.patch
2024-11-14 20:19 nitramr Relationship added related to 0017181
2025-02-27 14:09 nitramr Note Added: 0052130
2025-02-27 14:10 nitramr Status new => closed
2025-02-27 14:10 nitramr Resolution open => won't fix
2025-02-27 14:10 nitramr Relationship added related to 0017391