Bug 293889 - Contrast shading does not work properly with dark button background
Summary: Contrast shading does not work properly with dark button background
Status: ASSIGNED
Alias: None
Product: Oxygen
Classification: Plasma
Component: general (show other bugs)
Version: 4.0
Platform: Debian stable Linux
: NOR normal
Target Milestone: ---
Assignee: Hugo Pereira Da Costa
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-12 11:53 UTC by Goesen
Modified: 2021-03-09 23:58 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
black shading error (80.60 KB, image/jpeg)
2012-02-12 11:53 UTC, Goesen
Details
dark blue (66.50 KB, image/jpeg)
2012-02-12 11:55 UTC, Goesen
Details
other dark blue, other buttons work, other are incorrect (68.97 KB, image/jpeg)
2012-02-12 11:55 UTC, Goesen
Details
the same thing scrolled, to show that it occurs dependent on the vertical pos (75.32 KB, image/jpeg)
2012-02-12 11:56 UTC, Goesen
Details
GTK-backend-Oxygen (64.40 KB, image/jpeg)
2012-02-12 12:08 UTC, Goesen
Details
Requested color_scheme (2.31 KB, application/octet-stream)
2012-02-13 19:06 UTC, Goesen
Details
now look at my contrast (61.08 KB, image/jpeg)
2012-02-13 19:21 UTC, Goesen
Details
that's the right screenshot (73.98 KB, image/jpeg)
2012-02-13 19:25 UTC, Goesen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Goesen 2012-02-12 11:53:47 UTC
Created attachment 68720 [details]
black shading error

Version:           4.0 (using KDE 4.7.4) 
OS:                Linux

Some Buttons and Comboboxes are rendered incorrectly when i use widget-style oxygen, maximum contrast shading and a dark background color for buttons.



Reproducible: Always

Steps to Reproduce:
System settings color-> set a dark background color for buttons (e.g. black, but 
a dark blue works also) 
Options->shading:contrast -> set to Max

Actual Results:  
some buttons + checkboxes are not shaded... it seems to depend on their vertical
position in the containing window

Expected Results:  
all active (not disabled or inactive buttons) should look the same

This happens in every K-Application: i choose rekonq as example because you
can easily spot lines where rendering starts doing incorrect thing.

In KDE 4.3.5 no such thing occured
with widget style GTK and gtk style "oxygen-gtk" buttons are also rendered correctly.
Comment 1 Goesen 2012-02-12 11:55:03 UTC
Created attachment 68721 [details]
dark blue

the same thing with dark blue
Comment 2 Goesen 2012-02-12 11:55:40 UTC
Created attachment 68722 [details]
other dark blue, other buttons work, other are incorrect
Comment 3 Goesen 2012-02-12 11:56:42 UTC
Created attachment 68723 [details]
the same thing scrolled, to show that it occurs dependent on the vertical pos
Comment 4 Goesen 2012-02-12 12:08:05 UTC
Created attachment 68724 [details]
GTK-backend-Oxygen

style gtk with oxygen style works, but looks ugly, because gtk is ugly.
Comment 5 Hugo Pereira Da Costa 2012-02-13 08:11:49 UTC
Please post here the color scheme with which you are having issues (as attachment)
Comment 6 Hugo Pereira Da Costa 2012-02-13 09:35:40 UTC
Thing is: there is no "automatic" way that I know of to calculate derived colors from a base color, that would work in all cases. So it is actually unlikely that I could fix the issue you report: 
Basically we try (using a threshold) to determinate if a given color has low contrast or high contrast with respect to a given background, and  change the calculations according to the result.
The button color you picked is right at the border (close to the threshold), and crosses it, depending on where the buttons are on the page (wich corresponds to a different background). Hence the funky result.

I'd suggest either
- change the button color (I would try a less saturated color)
- change the contrast settings (in application appearance -> colors -> options -> shading) to a smaller value.

Still, I'd like to get a hand on the color scheme, because the color changing for checkboxes in the tree list, (second screenshot) should not be there, since the background is flat.

So this, at least, is definitely a bug that I should fix.

Thanks,

Hugo
Comment 7 Hugo Pereira Da Costa 2012-02-13 09:38:23 UTC
PS: there are dark themes on the market, which works just fine.
See for instance "obsidian coast".
Comment 8 Goesen 2012-02-13 19:06:32 UTC
Created attachment 68767 [details]
Requested color_scheme

It's not the same as in "2" (i don't have it anymore), but it shows 
an equal combobox table behaviour
Comment 9 Goesen 2012-02-13 19:21:31 UTC
Created attachment 68769 [details]
now look at my contrast

Hello Hugo,
thank you for your quick response

>Thing is: there is no "automatic" way that I know of to calculate derived
>colors from a base color, that would work in all cases.
KDE 4.3.5 ?

>The button color you picked is right at the border (close to the threshold),
>and crosses it, depending on where the buttons are on the page (wich
>corresponds to a different background). Hence the funky result.

Take a look at the attached screenshot... It seems like background does not
matter: That's the "default" color scheme with button color from dark_blue2
Comment 10 Goesen 2012-02-13 19:25:55 UTC
Created attachment 68770 [details]
that's the right screenshot

sorry in my previous post i somehow captured the wrong window
Comment 11 Hugo Pereira Da Costa 2012-02-13 19:34:57 UTC
KDE 4.3.5 had other issues.
(namely that the buttons would have no contrast with respect to background in some regions of the window and for some color scheme). That's what the changes that cause the issues you are having have been addressing in the first place.
In fact, that's exactly the point I was trying to make.
Comment 12 Goesen 2012-02-13 22:05:46 UTC
OK i understand that.
So oxygen-gtk probably uses the old routine and threrefore works better with dark buttons? 
I just hope that when you "fix" dark_blue2 you'll find an easy to resolve bug that fixes everything :)
Comment 13 Hugo Pereira Da Costa 2012-02-14 09:15:05 UTC
As far as I know, oxygen gtk has pretty much the same issue
See:
http://wstaw.org/m/2012/02/14/plasma-desktopwD3681.png
Comment 14 Goesen 2012-02-14 19:43:41 UTC
i am using oxygen-gtk 1.1.2 (repository),
and i have no such effects similiar to your screenshot (but appart from
the colors, the new oxygen-gtk looks far more better)
Comment 15 Justin Zobel 2021-03-09 23:58:21 UTC
Thank you for the bug report.

As this report hasn't seen any changes in 5 years or more, we ask if you can please confirm that the issue still persists.

If this bug is no longer persisting or relevant please change the status to resolved.