Review Request: Improve KColorChooser dialog color preset selection implementing a custom ItemDelegate

Darío Andrés andresbajotierra at
Sun Mar 28 18:10:26 BST 2010

This is an automatically generated e-mail. To reply, visit:

(Updated 2010-03-28 17:10:25.509387)

Review request for kdelibs and usability.


Take 2: added new screenshot with sunken border. I like how it looks. At least, it is a bit more "standard"
I also tried unselected=raised, selected=sunken, but it was too much confusing...


Do not use the QPalette::Highlight color to show the selected color preset in the KColorChooser dialog. 

Use a custom selection drawing, black or white (depending on the contrast with the original color (KColorUtils::constrastRatio > 3.5))
This way you get a "this color is selected" hint, but you are still able to see which color it was/is

My last choice was a centered empty circle. Drawing a rectangle (or dotted rectangle) had too much glitches as the color preset buttons in the tableview are small (~ 13x13 pixels)
Also, there is a bug (not caused by me) that reduces the color preset buttons height or width (by one) on the top/left borders (seems to be related to the QTableWidget without Headers..)

I tried to not use color shading as it is still confusing to the user...

As a gift, I added a small detail in the empty buttons (no color defined), drawing a cross on it (using the background color)

Attached screenshot: can you recognize the selected color in the first one ? (hint: the same color is selected in both screenies..)

This addresses bug 230524.


  svn:// 1107102 



It works Ok and it looks good (ok, it could be prettier, any ideas? may be a gradient?)
At least it doesn't block the real color.


Before and After my patch
With a radiobutton-like selection
Using sunken border on selected item



More information about the kde-core-devel mailing list