Color roles, coming this Monday to kdelibs?

Aaron J. Seigo aseigo at kde.org
Mon Jun 11 17:39:21 BST 2007


On Monday 11 June 2007, Simon Hausmann wrote:
> On Friday 08 June 2007 16:32:52 Matthew Woehlke wrote:
> > Simon Hausmann wrote:
> > > On Thursday 07 June 2007 00:58:46 Matthew Woehlke wrote:
> > >> As per the usability recommendation (1) and the original thread (2),
> > >> the attached patch adds color roles to KDE. There are still things to
> > >> do, like find things this breaks (I am guessing color schemes), find
> > >> places that need to use it (anyone using hard-coded colors has buggy
> > >> code according to u7y/a11y), and of course add something to configure
> > >> them
> > >>
> > >> :-), but these are not API changes (probably not even BIC).
> > >>
> > >> There are probably lots of users of most of the deprecated functions
> > >> and that is OK, they can keep using them in KDE4 :-). We /might/ want
> > >> to kill off KGS::calculateAlternateBackgroundColor if its replacements
> > >> are ready for KDE4.0 but that is for next week (there are only two
> > >> users shown by LXR, one of the three not-KGS hits is only a comment).
> > >>
> > >> According to aseigo (3) it is OK to change where the colors are
> > >> stored.
> > >>
> > >> Also, if anyone has better suggestions for the implementation (like, a
> > >> way to avoid macros w/o dozens more lines of code), please share :-).
> > >>
> > >> 1: http://amen-online.de/%7Eolafschmidt/colors/colors.pdf
> > >> 2: http://permalink.gmane.org/gmane.comp.kde.devel.core/42908
> > >> 3: http://permalink.gmane.org/gmane.comp.kde.devel.core/42933
> > >
> > > This looks interesting, but I think the enum values have unfortunate
> > > generic names. If you just see KGlobalSettings::View in application
> > > code it's impossible to know that this refers to a color set just from
> > > the name.
> >
> > Well, this won't happen. :-) Rather, you would see e.g:
> > KGS::color(KGS::View, KGS::ForegroundNormal)
> >
> > That is, I don't expect to see this used outside of KGS::color.
>
> Sure, that is clearly an argument in favor of having the enum in the same
> namespace as the method that returns the actual color. I still think though
> that KGlobalSettings is the wrong namespace.

which is what i said last week in an email.

> KColorTheme::InputWidgetColors or similar is closer to being
> self-explaining IMHO. The relationship with global KDE settings is IMHO
> less important than the fact that there are different colors for different
> types of widgets.

yep.

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

Full time KDE developer sponsored by Trolltech (http://www.trolltech.com)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070611/41ca7dd6/attachment.sig>


More information about the kde-core-devel mailing list