Bug 269904

Summary: Checkboxes have wrong colors in ccsm main page
Product: [Plasma] Oxygen Reporter: Ruslan Kabatsayev <b7.10110111>
Component: gtk2-engineAssignee: Hugo Pereira Da Costa <hugo.pereira.da.costa>
Status: CLOSED FIXED    
Severity: normal CC: b7.10110111, hugo.pereira.da.costa, web
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Unlisted Binaries   
OS: Linux   
Latest Commit: Version Fixed In:

Description Ruslan Kabatsayev 2011-04-01 23:42:09 UTC
Version:           unspecified
OS:                Linux



Reproducible: Always

Steps to Reproduce:
1. Start ccsm, observe checkboxes being darker from top to bottom (blending with default oxygen background gradient).
2. Scroll to the end, see checkboxes at the top being dark
3. Hover any of them - they become white.


Expected Results:  
I think blending should be disabled for cases when parent has custom background set (so that all the checkboxes in ccsm would be white).
Comment 1 Hugo Pereira Da Costa 2011-04-02 10:48:28 UTC
I agree with the suggestion but it is actually hard to implement.
There is already a check on whether checkbox is in list view, which fails for ccsm (cause they are actually not using a list view but some custom widget).

Now the problem is: the said parent is usually not the direct parent of the checkbox that is being repainted (you can have various layouts in between, for instance, e.g. GtkBox). 

So should we check the custom background for *all* parents, recursively ? 
I fear some overhead.
(especially since, if we want to do it consistently, it needs to be done for all widgets that we blend one way or the other). 

What do you think ?
Comment 2 Hugo Pereira Da Costa 2011-04-02 11:40:12 UTC
Git commit 78fdd3b958c9ec0642e83c79b6bdea046771a97a by Hugo Pereira Da Costa.
Committed on 02/04/2011 at 11:40.
Pushed by hpereiradacosta into branch 'master'.

added recursive Gtk::gtk_widget_has_custom_background method.

CCBUG: 269904

M  +12   -0    src/oxygengtkutils.cpp     
M  +3    -0    src/oxygengtkutils.h     

http://commits.kde.org/oxygen-gtk/78fdd3b958c9ec0642e83c79b6bdea046771a97a
Comment 3 Hugo Pereira Da Costa 2011-04-02 11:40:12 UTC
Git commit 1d2d6692dbcfb1cd5e5a89c17e97641b16e9a19d by Hugo Pereira Da Costa.
Committed on 02/04/2011 at 11:41.
Pushed by hpereiradacosta into branch 'master'.

use Gtk::gtk_widget_has_custom_background to decide whether checkboxes and radiobuttons should be blended.

CCBUG: 269904

M  +6    -3    src/oxygenstylewrapper.cpp     

http://commits.kde.org/oxygen-gtk/1d2d6692dbcfb1cd5e5a89c17e97641b16e9a19d
Comment 4 Hugo Pereira Da Costa 2011-04-02 11:41:40 UTC
ok. That fixes it.
So far I have implemented extra check only for checkboxes and radiobuttons.
It is doable for normal buttons but painful, (because drawButtonSlab is used all over the place, notably due to our custom comboboxes), so I'll wait for bug reports to show up :)