Bug 56053 - When setting dark color scheme, disabled menu items are completely illegible
Summary: When setting dark color scheme, disabled menu items are completely illegible
Status: RESOLVED WORKSFORME
Alias: None
Product: kdelibs
Classification: Frameworks and Libraries
Component: kstyle (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Karol Szwed
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-17 09:52 UTC by Leif Huhn
Modified: 2009-05-02 23:41 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Leif Huhn 2003-03-17 09:52:27 UTC
Version:            (using KDE KDE 3.1)
Installed from:    SuSE RPMs

If you make menus a dark color in the color center, disabled menu items show up even darker, which makes them unreadable.

To reproduce:

Start control center.  Click Appearances & Themes, Colors.  Select "Window Background" on the right, and choose black.  Click apply.  Pull up any menu in any KDE application with a disabled item.
Comment 1 Leif Huhn 2003-03-21 00:18:59 UTC
The bug is in kdelibs/kdecore/kapplication.cpp, at around line 1718 
 
    QColorGroup disabledgrp(disfg, background, 
                            background.light(highlightVal), 
                            background.dark(lowlightVal), 
                            background.dark(120), 
                            background.dark(120), base); 
 
    QColorGroup colgrp(foreground, background, background.light(highlightVal), 
                       background.dark(lowlightVal), 
                       background.dark(120), 
                       baseText, base); 
 
baseText is the color of a normal menu entry.  It is stored in the QColorGroup colgrp.  
The analagous entry for disabledgrp is background.dark(120).  This just makes the 
color darker, without any regard to it being lighter.  It would be nice if this color entry 
was given the same treatement as the text color for buttons further down (~line 
1743): 
 
    QColor disbtntext = buttonText; 
    disbtntext.hsv( &h, &s, &v ); 
    if (v > 128) 
        // dark button, light buttonText - need a darker disabled buttonText 
        disbtntext = disbtntext.dark(lowlightVal); 
    else if (disbtntext != black) 
        // light buttonText, dark button - need a lighter disabled buttonText - but only if 
!black 
        disbtntext = disbtntext.light(highlightVal); 
    else 
        // black button - use darkgrey disabled buttonText 
        disbtntext = Qt::darkGray; 
 
 
Comment 2 Maksim Orlovich 2003-05-12 20:45:59 UTC
Note that simple, as that entry isn't actually used.  
 
Comment 3 Leif Huhn 2003-07-08 07:34:24 UTC
Why isn't it used?  There seems to be no rhyme or reason to how KDE Styles choose their 
colors. 
 
Comment 4 Maksim Orlovich 2003-09-21 18:25:32 UTC
Yeah, because there is no "official" definition for what is to be used for what. And the 
isuse here is that the grey out effect uses colors that are bevel intermediate ones.  
That's why this is quite tricky -- it's hard to get the proper effect which people expect 
and guarantee contrast. Sorry on the slowness w/this BTW -- real life getting in the 
way.  
  
Comment 5 mike silva 2005-12-16 04:10:18 UTC
Yes, I think this is the same as reported in bug#96145 where I added some screenshots showing this problem.

I've been trying to use a black window (and buttons) background for about 8 years (at that time I was still using windows), but couldn't get to any usable configuration due to hard coded colors :(or automatic system color behaivour - in this case). So still have to use dark grey :(

I think the mental problem here is trying to emulate a white paper (light reflective device - or a passive element) using a computer screen (light source device - or the active element).

If each pixel lights to show something on the screen, why sould we have 90% of the pixels lighted on to it's maximum (white) to read text on the lighed off pixels :(black).
Comment 6 mike silva 2005-12-16 04:23:36 UTC
Corection to previous post:
I just did a comment to the bug#96145 but the screenshots I've posted in this topic:
http://kde-artists.org/main/forum/index.php?topic=362.0
Comment 7 Dario Andres 2009-05-02 23:41:49 UTC
Here using:

Qt: 4.5.1 (qt-copy  958974)
KDE: 4.2.71 (KDE 4.2.71 (KDE 4.3 >= 20090428))
kdelibs svn rev. 960693 / kdebase svn rev. 960693
on ArchLinux i686 - Kernel 2.6.29.1

Disabled widgets colors are now selectable/customizable so you if you are experiencing this you can revert it, even on plain black themes.