diff --git a/kstyle/breezehelper.cpp b/kstyle/breezehelper.cpp --- a/kstyle/breezehelper.cpp +++ b/kstyle/breezehelper.cpp @@ -60,9 +60,9 @@ //____________________________________________________________________ void Helper::loadConfig() { - _viewFocusBrush = KStatefulBrush( KColorScheme::View, KColorScheme::FocusColor, _config ); - _viewHoverBrush = KStatefulBrush( KColorScheme::View, KColorScheme::HoverColor, _config ); - _viewNegativeTextBrush = KStatefulBrush( KColorScheme::View, KColorScheme::NegativeText, _config ); + _viewFocusBrush = KStatefulBrush( KColorScheme::View, KColorScheme::FocusColor ); + _viewHoverBrush = KStatefulBrush( KColorScheme::View, KColorScheme::HoverColor ); + _viewNegativeTextBrush = KStatefulBrush( KColorScheme::View, KColorScheme::NegativeText ); const QPalette palette( QApplication::palette() ); const KConfigGroup group( _config->group( "WM" ) ); diff --git a/kstyle/breezestyle.cpp b/kstyle/breezestyle.cpp --- a/kstyle/breezestyle.cpp +++ b/kstyle/breezestyle.cpp @@ -194,9 +194,13 @@ QStringLiteral( "/BreezeDecoration" ), QStringLiteral( "org.kde.Breeze.Style" ), QStringLiteral( "reparseConfiguration" ), this, SLOT(configurationChanged()) ); -#if !BREEZE_USE_KDE4 + #if !BREEZE_USE_KDE4 + #if QT_VERSION < 0x050D00 // Check if Qt version < 5.13 + this->addEventFilter(qApp); + #else connect(qApp, &QApplication::paletteChanged, this, &Style::configurationChanged); -#endif + #endif + #endif // call the slot directly; this initial call will set up things that also // need to be reset when the system palette changes loadConfiguration(); @@ -1024,6 +1028,9 @@ #if QT_VERSION >= 0x050000 else if( auto commandLinkButton = qobject_cast( object ) ) { return eventFilterCommandLinkButton( commandLinkButton, event ); } #endif + #if QT_VERSION < 0x050D00 // Check if Qt version < 5.13 + else if( object == qApp && event->type() == QEvent::ApplicationPaletteChange ) { configurationChanged(); } + #endif // cast to QWidget QWidget *widget = static_cast( object ); if( widget->inherits( "QAbstractScrollArea" ) || widget->inherits( "KTextEditor::View" ) ) { return eventFilterScrollArea( widget, event ); }