RFC: move kdebase/runtime/kstyles to kdebase/workspace/kstyles/, small change in how default style is handled

Christoph Feck christoph at maxiom.de
Mon Mar 1 23:34:20 GMT 2010

On Monday 01 March 2010 23:24:56 Aaron J. Seigo wrote:
> while looking into the issue of the svn extern in kdebase, it occurred to
> me that having the oxygen widget style in runtime is perhaps a bit odd.

I agree, and would support moving it to kdebase/workspace.

> on non-KDE workspaces, KDE apps should try and use the native defaults.
> they already do so on non-x11 platforms by default, though on x11 KStyle
> always defaults to "oxygen"; this results in it falling back to whatever
> QStyleFactory::keys().first() is, unless otherwise set.
> while oxygen is referenced as the default style in kdelibs, the code
> handles it not being there gracefully, but i'd like to suggest a change:
> on x11 if we don't have our default style available to us then we try to
> use the gtk+ style first (most likely next candidate) and then move on to
> the "randomly select a style" approach. see the attached patch.

I did not look at all the code paths fully, but from looking at 
qguiplatformplugin_kde.cpp, Qt makes sure it reads the "widgetStyle" config 
entry, falling back to KStyle::defaultStyle().

So what I would suggest is removing the style handling from KDE, and just use 
what Qt uses when it detects the KDE platform. This way KDE apps probably 
use GTK+ style when run from a GNOME session automatically. Not sure if 
that is the desired behavior.

> moving kstyles to kdebase-workspace would also very neatly solve the issue
> of the svn external as both pieces of code using that svn extern would
> then be in the same module. :)

Actually I thought that was your primary motivation ;)

Christoph Feck (kdepepo)

More information about the kde-core-devel mailing list