[KRDB] Remove Oxygen-era colour exporting code
Changes PlannedPublic

Authored by cblack on Mon, Oct 7, 3:48 PM.

Details

Reviewers
ngraham
broulik
Group Reviewers
Plasma
Summary

Note: this description is inaccurate and will be updated.

GTK2 colours are no longer exported.
This is necessary in 2019 because most popular GTK2 themes (including Breeze GTK) primarily use pixmaps
which cannot respect these colours. This results in odd-looking mixtures of some widgets following the
colourscheme and some not.

See: https://bugsfiles.kde.org/attachment.cgi?id=122870

BUG: 412331
FIXED-IN: 5.17.0

Test Plan

See that GTK2 colours are no longer exported and that GTK2 themes with a mixture of pixmaps/not pixmaps
don't display colour inconsistencies.

Diff Detail

Repository
R119 Plasma Desktop
Branch
krdb-remove-oxygen-era-code (branched from master)
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 17401
Build 17419: arc lint + arc unit
cblack created this revision.Mon, Oct 7, 3:48 PM
Restricted Application added a project: Plasma. · View Herald TranscriptMon, Oct 7, 3:48 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
cblack requested review of this revision.Mon, Oct 7, 3:48 PM
cblack edited the summary of this revision. (Show Details)Mon, Oct 7, 3:49 PM
cblack edited the summary of this revision. (Show Details)
cblack added a comment.Mon, Oct 7, 3:58 PM

Is this the other half for fixing https://bugs.kde.org/show_bug.cgi?id=412331?

It'll get rid of the bug on its own by not exporting colours at all. (so instead of a mixture of following/not-following, it'll just not follow at all)
This patch is primarily intended to get something that's known working as a solution in before 5.17 releases. While my other patches related to
GTK2 recoloration *should* work, they're not as well tested as just disabling the behavior that results in graphical oddities in the first place.

ngraham edited the summary of this revision. (Show Details)Mon, Oct 7, 4:06 PM
ngraham accepted this revision.Mon, Oct 7, 4:25 PM

Can confirm that it fixes the bug and the fix conceptually makes sense. I'd like a review from a Plasma person to confirm before landing this though.

This revision is now accepted and ready to land.Mon, Oct 7, 4:25 PM
broulik added a subscriber: broulik.Mon, Oct 7, 4:33 PM

I don't understand what this is solving. Did this work before, if so, what broke it, that suddenly requires this patch?

cblack added a comment.Tue, Oct 8, 6:27 AM

I don't understand what this is solving. Did this work before, if so, what broke it, that suddenly requires this patch?

Well, since the checkbox to toggle this code was removed from the colours KCM, it's either always on or always off, and it seems to have defaulted to always on. Always on looks *terrible* with certain GTK2 theme/colorscheme mixtures (Breeze GTK is particularly affected by this), while always off simply has the result of not following a scheme for GTK2 themes that do that. (which is pretty rare)

I think this bug has been present for a while, it's just that it was flying under radars until now.

it seems to have defaulted to always on

Yes, I did that because it makes sense.

(which is pretty rare)

So, you're saying GTK2 themes are likely to follow color schemes but GTK3 are not?

(including Breeze GTK) primarily use pixmaps

Basically, we cannot have GTK 2 apps follow color schemes anymore, or did that ever really work?

cblack added a comment.Tue, Oct 8, 1:24 PM

it seems to have defaulted to always on

Yes, I did that because it makes sense.

(which is pretty rare)

So, you're saying GTK2 themes are likely to follow color schemes but GTK3 are not?

I meant that it was rare for GTK2 themes in 2019 to attempt to follow the colorscheme, not that it was rare for them to not follow the colorscheme.

(including Breeze GTK) primarily use pixmaps

Basically, we cannot have GTK 2 apps follow color schemes anymore, or did that ever really work?

Well, some GTK2 themes (i.e. oxygen) attempt to follow the colorscheme, but the graphical artifacts caused in other GTK2 themes make it a poor choice to always export colours.

cblack added a comment.EditedTue, Oct 8, 1:33 PM

Some examples of exporting colours causing graphical artifacts:


(Adapta)

(Adwaita)

(High Contrast)

(Arc)

From the bug mentioned (Breeze GTK):


The last image is how GIMP appears by default on a fresh Plasma setup. Not a very good impression.

broulik resigned from this revision.Wed, Oct 9, 8:39 PM
cblack edited the summary of this revision. (Show Details)Thu, Oct 10, 1:28 AM
cblack planned changes to this revision.Thu, Oct 10, 1:44 AM

So it turns out I ran into an unrelated bug that at first glance appeared to be the linked bug with my setup, but in reality, it's actually unrelated.

Regarding that, I'm not sure how useful this patch actually is in terms of fixing the bug that was linked here.

Looks like I'll be going back to the drawing board for this bug.