Skip to content

KMessageWidget: Set the palette to work with non-KStyle styles

The widget's palette is used to interpolate the fill colour in the paint event. KStyle-derived styles set the palette from the configured Plasma colour settings, but styles which are not derived from KStyle may not do so. In this case the fill colour remains the same as the default window background colour and the message widget will not show a filled background.

Setting the palette here provides a fallback for non-KStyle styles, and is harmless for KStyle styles.

Appearance before - oxygen-demo6 with the Qt Fusion style:

fusion-before

Appearance after:

fusion-after

Merge request reports