[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Themes GNUstep
From: |
Nicolas Roard |
Subject: |
Re: Themes GNUstep |
Date: |
Wed, 31 Jul 2002 20:00:11 +0100 |
On 2002-07-31 08:34:39 -0600 Adam Fedor <fedor@doc.com> wrote:
- some informations needed for a theme isn't always available (as in NSButtons,
the style (NSRadioButtons, etc.) isn't stocked, which render a theme
implementation
quite hazardous)
There's a function in Gorm (Palettes/2Controls/inspectors.m) which returns the
button type for a button. Perhaps we could put that in gui if it is useful.
Yes PY told me about it, I must look at it.
But I thought that it could be simpler to stock the buttonType in the
NSButtonCell
when setted by setButtonType ?
- I must currently re-implement drawRect functions (or similars) to drawing the
widgets
backgrounds, which force me to reimplement the entire drawRect function,
and add my code... if the code of drawRect change in the gnustep cvs, I must
update it in thoses themes bundles. Could it be possible to have a dedicated
function for drawing the background of a widget ? which will be called
instead of the [backgroundColor set]; NRectFill (cellFrame); ?
I'd like to make those changes, but I don't want to break something ;)
So what are you thinking about this ?
Well, I'd like to make themes easier also, but I don't know the best way to do
it. Perhaps redoing the background and frame drawing functions so they can be
overridden, or perhaps specific (and documented) drawing methods for different
widgets. I was hoping someone could take the time to look at how other systems
implement themes and adopt that to GNUstep.
Previously, what I did was simply to test/validate/understand the concept :) so
I'm currently working on a complete theme (gradients like thoses in wmaker).
It permits me to better understand the drawings relations between all the
widgets, etc. After that, I should have a better idea of how to redesign
(eventually) the classes
to simplify a theme writing, or if we could simply keep things as they are, and
just write a howto ;)
As far as I know, there are two methods used in others systems (KDE/Gtk) :
- implement new drawings functions (.so) (what I did)
- use a "theme engine" and skin the interface with pixmaps
Reimplement drawings functions are more complex to do, but faster at
execution; A theme engine based on pixmap should allow users to create
theme simply, but it will be slower.
I'll try to implement a pixmap theme engine in the future.
--
Nicolas Roard <nicolas@roard.com>
http://info.xdev.org/projets/gsftp
the linux philosophy is laugh in the face of danger. Oops. Wrong one. 'Do it
yourself'. That's it.