Fwd: Theme Manager: How to cope with the preview?

Rob Kaper cap at capsi.com
Fri Apr 26 16:34:14 BST 2002


On Fri, Apr 26, 2002 at 07:21:58PM +0200, Daniel Molkentin wrote:
> I am currently sitting drawing up a class structure sketch of the of the new
> Theme Manager. While stepping forward and also started implementing some
> header stubs, I am unsure on how to implement the preview best.
> 
> Aspects that need to be covered:
> - Wallpaper with all size policies
> - Widgetstyle and color
> - KWin Style
> - Fonts
> - Desktop

Please focus on the aspect that all these items (fonts, colours, icons) can
also be configured seperately.

What I would love to see is a theme mnanager truly honouring that. Theme-Cap
consists of Slick icons + FreeKDE.org scheme + Tahoma fonts, etc.

If a theme installs itself, it should not just update "current colour"
scheme but install the colour scheme it wants as a real colour scheme and
then select it.

Also, fonts/icons/colours/style should all use be tabs for one look&feel
entry sharing the same preview widget.

> The best idea I has so far is  to preview "live" via QWorkspace and friends
> the qtconfig way. This raises some problems:

Yes, that'd be ideal.

> - How do I figure what the user clicked ( i.e. did I click the widget or a
>   text?)

Hm, check the current colour scheme preview for that, it already has that
seperation. Probably just checks whether you clicked the QWidget or QLabel
(text).

> - What about popup menus in the preview? Faking them seems is the best
>   approach I found so far.

Hm, yah.. I guess.

> - How can I make QWorkspace use the current KWin Style. I think this is
>   the most difficult problem and maybe we cannot really solve that in the
>   frist incarnation of the theme manager.

Not with the current setup, no. It would be nice if KWin had a

static QPixmap *KWin::pixMap(QString caption, int w, int h, KStyle *style)

to make it easier to fake widgets. Preferably all widget effects should work
like this, having the rendering as a static member somewhere so any app can
use any effect whereever.

I'm doing the same for Quartz at the moment, I want to have those effects in
Atlantik in various places so I am making a QuartzEffect for KPixmap in
kdefx which will alow you to create a pixmap of any size for any colour
combo that will have Quartz effects.

My 2c.

Rob
-- 
Rob Kaper     | "This [party] is your idea of hell?"
cap at capsi.com | "Actually, in hell you tend to know a lot of the people"
www.capsi.com | -- Cordelia and Angel, "She"




More information about the kde-core-devel mailing list