Bug 328270 - buggy drakxtools banner rendering
Summary: buggy drakxtools banner rendering
Status: RESOLVED FIXED
Alias: None
Product: Oxygen
Classification: Plasma
Component: gtk3-engine (show other bugs)
Version: 1.2.0
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Hugo Pereira Da Costa
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-01 06:20 UTC by tv
Modified: 2013-12-02 16:36 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Banner rendered with Adwaita (14.48 KB, image/png)
2013-12-01 06:30 UTC, tv
Details
Banner rendered with Oxygen-gtk3 (15.68 KB, image/png)
2013-12-01 06:30 UTC, tv
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tv 2013-12-01 06:20:50 UTC
Mageia's drakxtools were recently ported from gtk2 to gtk3
Previously they would render their banner using a GtkDrawingArea and a custom drawing callback.

Now they use standard Gtk+ widgets:
- an overlay contains a GtkLabel as main widget with another overlay on it at
  left  (right for RTL languages).
- this secondary overlay contains a generic image (the blue part shown on
  the screenshots) and a per application icon on top of it
See http://gitweb.mageia.org/software/drakx/tree/perl-install/ugtk3.pm#n1371

This is rendered fine with Adwaita but not with Oxygen-gtk3 (compare attached screenshots)

Then a CSS file makes the banner text be blue.

Reproducible: Always

Steps to Reproduce:
1. set gtk them to Adwaita and run localedrake
2. see good rendering
3. set gtk them to Oxygen-gtk and run localedrake
4. see bad rendering
Actual Results:  
The label's text is not displayed and gray is rendered since top left coordonates of the small icon up to bottom right coordinates of the banner

Expected Results:  
Right rendering:
[                                         ]
| [icon]     [blablablabla] |
[                                         ]
Comment 1 tv 2013-12-01 06:30:10 UTC
Created attachment 83848 [details]
Banner rendered with Adwaita
Comment 2 tv 2013-12-01 06:30:26 UTC
Created attachment 83849 [details]
Banner rendered with Oxygen-gtk3
Comment 3 Hugo Pereira Da Costa 2013-12-02 11:01:05 UTC
Git commit 50dcea18bb61061a54b3a1b2565ba5ac5866de3d by Hugo Pereira Da Costa.
Committed on 02/12/2013 at 10:58.
Pushed by hpereiradacosta into branch 'gtk3'.

- set some background to transparent explicitly in css, rather than using if statement in
render_background

- disable background on GtkOverlay

- cleanup some code

M  +26   -0    src/oxygenqtsettings.cpp
M  +4    -12   src/oxygenthemingengine.cpp

http://commits.kde.org/oxygen-gtk/50dcea18bb61061a54b3a1b2565ba5ac5866de3d
Comment 4 Hugo Pereira Da Costa 2013-12-02 11:01:32 UTC
Banner is back, but label is still not blue
Still investigating why
Comment 5 Hugo Pereira Da Costa 2013-12-02 11:38:01 UTC
@Thierry
From the diff code posted in the first comment, can you tell me how the blue text color is achieved ? I guess that would help me getting it fixed in oxygen-gtk3
Comment 6 tv 2013-12-02 11:59:35 UTC
The Banner widget (really the GtkOverlay) is set to have 'Banner' as name (with set_name()):
http://gitweb.mageia.org/software/drakx/tree/perl-install/ugtk3.pm#n1371

This CSS file set widgets named 'Banner' to be rendered as blue:
http://gitweb.mageia.org/software/drakx/tree/perl-install/share/themes-galaxy.css
Comment 7 Hugo Pereira Da Costa 2013-12-02 13:38:56 UTC
@Thierry
Thanks, that helps.
Investigating a bit, seems that the setting from galaxy is ignored because oxygen-gtk3 sets all (foreground) colors to black (well to kde's pallette).
Now this should be overwritten by the galaxy setting, but the code 

#Banner {
  color: #5A8AD6;
}

Only applies to the #Banner widget and not its children (the actual GtkLabel)
so that oxygen-gtk is kept.
If you change the above into:

#Banner *{
  color: #5A8AD6;
}

Then blue label reappears magically (I think)
Can you give it a shot ? (on top of the patch above) ? 
Thanks in advance,

Hugo
Comment 8 tv 2013-12-02 13:42:58 UTC
Actually, I'd done so 10minutes before your comment :-)
http://gitweb.mageia.org/software/drakx/commit/perl-install/share?id=11ba82c878d478bd7707dd7a5d1083b19ecd4060

But in order to test, I need the patch that fixes the gray block...
Comment 9 tv 2013-12-02 13:51:15 UTC
With the above commit, it's all good!
Thanks
Comment 10 Hugo Pereira Da Costa 2013-12-02 16:36:51 UTC
thanks for the feedback
closing, then