Bug 328383

Summary: oxygen-gtk3 uses strange colors for Label on Fixed and Notebook's tabs for mcc
Product: [Plasma] Oxygen Reporter: tv <thierry.vignaud>
Component: gtk3-engineAssignee: Hugo Pereira Da Costa <hugo.pereira.da.costa>
Status: RESOLVED FIXED    
Severity: normal CC: b7.10110111, hugo.pereira.da.costa, web
Priority: NOR    
Version First Reported In: 1.2.0   
Target Milestone: ---   
Platform: Mageia RPMs   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: bogus splash screen
bogus notebook on left
all-in-one patch
mcc using gtk3 (WIP°)
its CSS file
fix gray text on gray (when cursor is on left labels)
with adwaita, it's OK
with adwaita, it's OK (black text over white bg)
with oxygen-gtk3, bg of the label with the cursor is on is blue

Description tv 2013-12-03 13:32:12 UTC
I'm currently porting Mageia's mcc from gtk2 to gtk3
There's a regression when going from oxygen to oxygen-gtk3:
the later uses strange colors for Label on Fixed and Notebook's tabs for mcc.
They're rendered white on blue rectangles.
See attached screenshots

Reproducible: Always

Steps to Reproduce:
1. run gtk2 mcc
2. see the colors are right (white text on top of the background image)
3. run gtk3 mcc
4. see the colors are wrong
Actual Results:  
white text on  blue rectangles.

Expected Results:  
white text on top of the background image
Comment 1 tv 2013-12-03 13:33:03 UTC
Created attachment 83897 [details]
bogus splash screen
Comment 2 tv 2013-12-03 13:33:32 UTC
Created attachment 83898 [details]
bogus notebook on left
Comment 3 Hugo Pereira Da Costa 2013-12-03 13:52:56 UTC
@Thierry,
likely more issues with css. Did you push the new mcc already so that I can test ? 
It is very difficult to "guess" the issue without it, sadly.
Some of the changes I have locally should fix at least the background issue. Might not be true for the foreground, though.
Comment 4 Hugo Pereira Da Costa 2013-12-03 13:59:25 UTC
Created attachment 83899 [details]
all-in-one patch

This is an all-in-one patch.
It should superseed the other patches sent on that topic, and actually fix the issues reported in this bug.

Keep me posted,

Hugo
Comment 5 tv 2013-12-03 14:21:40 UTC
No I've not yet pushed gtk3 mcc.
This patch didn't fixed the background
Comment 6 tv 2013-12-03 14:21:50 UTC
Created attachment 83901 [details]
mcc using gtk3 (WIP°)
Comment 7 tv 2013-12-03 14:22:17 UTC
Created attachment 83902 [details]
its CSS file
Comment 8 Hugo Pereira Da Costa 2013-12-03 19:28:10 UTC
Thanks for the includes,
Do you have any instructions on how I can actually start it here ? 
(right now it fails with: 

undefined value for mandatory argument 'path' encountered at /home/hpereira/gtk/mcc/control-center.txt line 89.

(where it is supposed to load the css)

Thanks in advance, 

hugo
Comment 9 tv 2013-12-03 20:43:03 UTC
It should be is actually the RC file, in /usr/share/mcc/themes/default/
Comment 10 Hugo Pereira Da Costa 2013-12-03 21:31:49 UTC
ok. Thanks ! now I can run.
More later.
Comment 11 Hugo Pereira Da Costa 2013-12-03 21:38:27 UTC
For the record, I see the same issues with (current) Adwaita here.
Can you confirm ?
Comment 12 tv 2013-12-04 07:56:00 UTC
Indeed.
I'll see with upstream
Comment 13 tv 2013-12-04 08:03:01 UTC
Thought it looks like a recent change makes the same bug happens for installer:
see https://bugs.mageia.org/show_bug.cgi?id=11866
Comment 14 tv 2013-12-04 08:05:47 UTC
Just copying the older /usr/lib/gtk-3.0/3.0.0/theming-engines/liboxygen-gtk.so in installer image fixed it so it's a regression in one of the two patches you provided
Comment 15 Hugo Pereira Da Costa 2013-12-04 08:21:29 UTC
yes, I can confirm that with older oxygen-gtk3 the issue is gone.
So I'll investigate the difference.
Will keep you posted.
Comment 16 Hugo Pereira Da Costa 2013-12-04 08:36:49 UTC
Investigating a bit:
it seems that the background color for the GtkLabels of mcc is set to blue in some of the css files you are using. (if I set them to transparent in my css files explicitly this is not respected, so must be overwritten somewhere in apps specific css)
This was explicitly ignored in previous oxygen-gtk3, disregarding css.
I removed that along the fix to diskdrake, as it should be.
This explain why 
- the bug was not there before
- it is there now
- it is also there with adwaita, which does a better job than us at respecting css files.

Can you double check on your side ? I would hate re-introduce the explicit "ignore css" that was there before ...
Comment 17 Hugo Pereira Da Costa 2013-12-04 09:10:38 UTC
From my own investigation, the background set in:
#Logo, #Steps * {
  /* base[NORMAL] = { 0.28, 0.38, 0.66 }; */
  background-color: #548EE6;
  color: #FFFFFF;
}

is the bad guy.
That's the one that gets set as flat background for any gtkLabel in mcc.
welcome to css gtk3 mess
Comment 18 Hugo Pereira Da Costa 2013-12-04 09:11:38 UTC
(in theme-galaxy.cxx)
Comment 19 tv 2013-12-04 13:42:17 UTC
I sense a bit of ironics :-)
Thanks for debugging it :-)
Sorry for the false bug report
Comment 20 tv 2013-12-04 14:18:31 UTC
I now need to fix the CSS for highlighted items which are rendered white on gray...
Comment 21 tv 2013-12-04 14:42:43 UTC
CSS fixed for hover elements too
Comment 22 tv 2013-12-04 15:19:45 UTC
Created attachment 83925 [details]
fix gray text on gray (when cursor is on left labels)
Comment 23 tv 2013-12-04 15:20:37 UTC
Created attachment 83926 [details]
with adwaita, it's OK
Comment 24 tv 2013-12-04 15:21:42 UTC
Created attachment 83927 [details]
with adwaita, it's OK (black text over white bg)
Comment 25 tv 2013-12-04 15:25:40 UTC
Created attachment 83928 [details]
with oxygen-gtk3, bg of the label with the cursor is on is blue

... which I supposed is fine according to Oyxgen-gtk3 guidelines but:
- the black color is not enforced
- the white color is not enforced (when the cursor is over)
  => I may need a way to differentiate Adwaita from Oxygen in CSS in order
  to set fg color to black only for Adwaita
Comment 26 Hugo Pereira Da Costa 2013-12-04 16:04:15 UTC
So the issue is basically that hover effects are mutually exclusive in terms of foreground color netween adwaita and oxygen.
My suggestion would be to reimplement the hover effect in css.
For oxygen it will be mostly ignored (no comment). For adwaita however, since it is entirely css based, it should overwrite adwaita. If you implement something similar to oxygen, that would fix the issue ...
I can help on that if needed.
Note that in fact, implementing you own background color for hovered buttons would probably be honored by both oxygen and adwaita, thus also fixing the issue
(must be tried)
Comment 27 Hugo Pereira Da Costa 2013-12-04 16:06:02 UTC
... Reopening, then.
I really like mcc. Ready to help making it look good
Comment 28 tv 2013-12-04 18:54:38 UTC
Thanks.
We could do that indeed.
Comment 29 Hugo Pereira Da Costa 2014-01-10 09:03:38 UTC
so ... problem fixed.
closing