Index: src/kmessagewidget.cpp =================================================================== --- src/kmessagewidget.cpp +++ src/kmessagewidget.cpp @@ -258,6 +258,8 @@ { d->messageType = type; QColor bgBaseColor; + // use the current widget's palette (it could be different from the application palette) + const QPalette palette = palette(); // We have to hardcode colors here because KWidgetsAddons is a tier 1 framework // and therefore can't depend on any other KDE Frameworks @@ -267,7 +269,8 @@ bgBaseColor.setRgb(39, 174, 96); // Window: ForegroundPositive break; case Information: - bgBaseColor.setRgb(61, 174, 233); // Window: ForegroundActive + // use the highlight colour for this type, as before + bgBaseColor = palette.highlight().color(); break; case Warning: bgBaseColor.setRgb(246, 116, 0); // Window: ForegroundNeutral @@ -279,7 +282,6 @@ const qreal bgBaseColorAlpha = 0.2; bgBaseColor.setAlphaF(bgBaseColorAlpha); - const QPalette palette = QGuiApplication::palette(); const QColor windowColor = palette.window().color(); const QColor textColor = palette.text().color(); const QColor border = bgBaseColor;