[KMessageWidget] Allow the style to change our palette
ClosedPublic

Authored by davidre on Jan 30 2020, 3:40 PM.

Details

Summary

After we set our palette give the current QStyle a chance to give us a better
palette that maybe fits better because we can only use hardcoded colors. To
avoid infinite recursion when the style calls setPalette on the widget we don't
react to palette change events anymore but when the application palette is
changed.

Test Plan

N/A

Diff Detail

Repository
R236 KWidgetsAddons
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
davidre created this revision.Jan 30 2020, 3:40 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptJan 30 2020, 3:40 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
davidre requested review of this revision.Jan 30 2020, 3:40 PM
apol added a subscriber: apol.Feb 23 2020, 12:45 AM

But then now we are not refreshing the palette when it changes outside, no?

How about adding a boolean value when it's already happening to prevent the infinite recursion?

In D27038#616095, @apol wrote:

But then now we are not refreshing the palette when it changes outside, no?

How about adding a boolean value when it's already happening to prevent the infinite recursion?

I refresing the palette when the application palette changes. But yes could also do it this way

apol accepted this revision.Feb 23 2020, 11:32 PM

Meh, right. I guess it doesn't matter that much.

This revision is now accepted and ready to land.Feb 23 2020, 11:32 PM
This revision was automatically updated to reflect the committed changes.