Temporary KColorScheme change - hard-code some state colors

Richard Dale richard_dale at tipitina.demon.co.uk
Mon Sep 17 17:01:05 BST 2007


On Monday 17 September 2007, Matthew Woehlke wrote:
> Richard Dale wrote:
> > On Monday 17 September 2007, pinheiro wrote:
> >> i think we should keep this feature turned off by defoult for the moment
> >> until we get it in to ship shape condition, (the flikering and the delay
> >> are real issues that we must deal with until we can realy use it) AFIK
> >> its rely not big on cpu so ithink we should try it as an option as i
> >> think many of the issues will be solved in the near future..
> >
> > No, the hack to use the inactive control color palette for entire windows
> > is just broken and can never be made to work properly.
>
> Have you reported this bug to TT so that QPalette::Inactive can be
> removed in Qt5? Really, if it was so "fundamentally broken", don't you
> think TT would not have added it in the first place, much less gotten it
> working as well as it does? If this "it has bugs therefore it must be
> fundamentally broken" attitude ran the world, we'd still be living in
> caves.
>
> And yes, I completely disagree with the assertion that this "can never
> be made to work properly".
>
> Also: get this "we can't make the text less contrasting because then it
> is unreadable" out of your head. If you don't like that effect, *then
> don't use it*. The default effect, if there is any, obviously will have
> to be something that does not make this a problem. What I'm getting from
> you is a lot of "it doesn't work for me, therefore no one should have it".
>
> Btw, someone had said the font chooser is broken? I didn't see anything
> wrong, anyone have a sample screen shot?
>
> > The visual metaphor you
> > use for indicating the an individual control is inactive is different
> > from the metaphor that you might want to use within the window contents
> > to indicate the entire window is inactive.
>
> You still seem to think that QPalette::Inactive == widget does not have
> input focus. This is not the case, (enabled) widgets without input focus
> are active iff isWindowActive()==true.
>
> - QPalette::Active => isWindowActive()
> - QPalette::Inactive => !isWindowActive()
>
> > We would need to use another mechanism entirely to do the effect that Mac
> > OS X has - ie only change the color of the knob in a scroll bar and only
> > just the color of selections. The inactive palette effect does far more
> > than just that. I assume that the Qt style for Mac OS X must do this
> > already, and maybe there is some api in Qt to allow it to work that we
> > could experiment with using.
>
> This is the sort of thing that convinces me some people are totally
> fixated on the intensity effect and don't even realize there are other
> effects.
>
> We *might* be able to do exactly this (although it would be really,
> really hard since there is intimate knowledge of the palette happening
> here). I think what would work better is to use ColorTint, where the
> tint color == QPalette::Window; this way QPalette::Window doesn't
> change, but everything else "fades" into that color.
>
> I'm not saying that we *should* do that, just trying to make the point
> that this isn't as inflexible as some people seem to think.
The reason I call the inactive palette change a 'hack' is because I thought 
you were attempting to use the same api, and the same visual metaphor for 
both.

But the QPalette docs say this:

"If you create a new widget we strongly recommend that you use the colors in 
the palette rather than hard-coding specific colors.
The color groups:
The Active group is used for the window that has keyboard focus.
The Inactive group is used for other windows.
The Disabled group is used for widgets (not windows) that are disabled for 
some reason.
Both active and inactive windows can contain disabled widgets. (Disabled 
widgets are often called inaccessible or grayed out.)
In most styles, Active and Inactive look the same."

So it does look like I'm wrong. All I can say is when I first tried this 
change, it made the KDE4 UI look like a dog's breakfast. Do we have any 
examples of styles where Active and Inactive don't look the same which are 
visually appealing?

-- Richard






More information about the kde-core-devel mailing list