KGlobalSettings move to kde4support
Matthew Woehlke
mwoehlke.floss at gmail.com
Wed Jun 19 19:04:57 UTC 2013
On 2013-06-18 11:54, Aleix Pol wrote:
> On Tue, Jun 18, 2013 at 5:40 PM, Matthew Woehlke wrote:
>> On 2013-06-18 03:10, Dominik Haumann wrote:
>>> On Tuesday, June 18, 2013 08:14:50 Kevin Ottens wrote:
>>>> On Monday 17 June 2013 19:43:33 Aleix Pol wrote:
>>>>> So I was looking at KGlobalSettings to see what we need to do to finally
>>>>> deprecate all KGlobalSettings, as suggested by the required kdelibs
>>>>> cleanups.
>>>>>
>>>>> So the things missing to be done are:
>>>>> - (in)active(Title/Color)Color: I'm unsure why those are there, but
>>>>>
>>>>> they're only used by khtml (within kdelibs) and I don't know if they're
>>>>> configurable. I guess they should be using KColorScheme, although I
>>>>> don't see caption properties there. Ideas?
>>>>>
>>>>
>> What are these used for? They sound like WM colors?
>>
>> It's used a bit outside of kdelibs, but not much indeed. Still as you said
>>>> it likely makes most sense in KColorScheme. So I'd say extend
>>>> KColorScheme
>>>> accordingly and then deprecate.
>>>>
>>>
>> Perhaps, but KColorScheme already has quite some colors and they are
>> (fairly) well organized at the moment. I would like to understand first
>> what these other colors are used for and if maybe existing colors should be
>> used instead, or at least how to best fit them into the existing framework.
>
> Here you can see where and how it's used:
>
> http://lxr.kde.org/ident?i=activeTitleColor
> http://lxr.kde.org/ident?i=inactiveTitleColor
> http://lxr.kde.org/ident?i=activeCaptionColor
> http://lxr.kde.org/ident?i=inactiveCaptionColor
Yes, those appear to be the WM colors.
Two possibilities come to mind. One is to continue to treat WM colors as
totally independent. I think this would be best done by creating a new
class similar to KColorScheme but not the same class, maybe
KWmColorScheme. This is the simplest and most similar to the current
state of things.
The best way I have come up with to extend KColorScheme to support WM's
is to add a new color set, maybe TitleBar or Caption, and to add a new
decoration role BorderColor (defaulting to normal background). The new
color set would need to load both border color, and all colors for the
Inactive state, separately from settings so that users have the same
degree of control as before. (Actually maybe not border color; I don't
think the KCM allows setting that independently at the moment. Maybe we
could even omit border color entirely, at least for now.)
The advantages of the second method are that WM's would also newly get
all the additional color role goodness (window title bar with
PositiveBackground, anyone?) and users can again configure the secondary
("blend") title bar background color (as this should switch over to the
AlternateBackground role). However it makes KColorScheme's life harder
due to the special case code for loading colors for the new set, and
requires more changes to the KCM.
--
Matthew
More information about the Kde-frameworks-devel
mailing list