Instead of a hard-coded hack for a single theme ("Air") to deal with themes
with large margins, having a generic hack based on heuristics makes
non-default themes look better in the preview.
Not using "widgets/panel-background" for "Air" also results in a better
preview for Air.
Details
- Reviewers
ngraham - Group Reviewers
Plasma VDG - Commits
- R119:34387d450ab2: [Desktop Theme KCM] "Normalize" margin around background in previews
Diff Detail
- Repository
- R119 Plasma Desktop
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
The hack for "Air" was especially annoying as it fails for themes inheriting "Air" and reusing the widget background, like "Air openSUSE"
Before:
After:
(updated to latest code)
Looks in average better IMHO, and makes things more comparaible, unless one is out to know the transparent margin size perhaps.
Something still strange with "openSUSE dark", but that might be an issue with the theme itself. Or elsewehere, as if one changes the icon theme while kcmshell desktoptheme is running, on the update of the view it suddenly also has normalized margins...
On a second look, of course the normalized margins should be also used for
the content shown in the widget
+1 Since there is no "proper" way I think this is fine and also looks a lot better than the previous Kraut und Rüben.
Seems the broken openSUSEdark display was due to cached rendered pixmaps, at least I can no longer reproduce it. So for completeness, and to celebrate the initial recovery of good old Fluffy Bunny theme, here another After (beware, can harm sensitive eyes):
Clip the background to not overrun the item border and thus also the
selection/highlight markup
Hit & found thanks to fluffy themes :)
Personally I would consider this a bug fix and apply to 5.12. I always thought the openSUSE themes are broken just by their preview being so messy. It's a simple fix with no side-effects by what I can tell.
What do you think?
Could you retry with cleaned Plasma cache? As discussed before, I saw this with openSUSE dark as well, but since it disappeared and all the time I messed around with fluffy themes, I have not seen any new breakage of that kind.
@broulik Any chance you could retry soon, with caches cleaned before? For me any such misrenderings disappeared and have not come back since I cleaned the cache. Also would I have no explanation code-wise why that would happen (though also no idea how the caching works, ideally that would not happen at all).
Also happy to have somebody else try this :)
I could reproduce this now by accident while juggling with my patches. Turns out this is another case where D19743 will fix things, as this ensures the correct current margins are used.
So would be great if someone could have a look at that one. And also means, this patch here is then only Plasma master/5.16 material...