Re: Theme-related request for GTK 2.0
- From: Johan Hanson <misagon mail bahnhof se>
- To: Owen Taylor <otaylor redhat com>
- Cc: gtk-list gnome org
- Subject: Re: Theme-related request for GTK 2.0
- Date: Sun, 23 Dec 2001 00:33:25 +0100
Owen Taylor wrote:
>
> Johan Hanson <misagon mail bahnhof se> writes:
>
> > The new default look is implemented not only in class GtkStyle but also
> > in some widgets. Most of the differences can be reset via style
> > properties, but existing themes for Gtk 1.2 need to be modified to look
> > the same under Gtk 2.0.
> >
> > I have written a theme engine for Gtk 1.2 which I am now porting to
> > Gtk 2.0, and I would like my theme engine to reset the default values
> > for certain style properties as to get some defaults of Gtk 1.2.
> >
> > I suggest that there would be a method:
> > void gtk_rc_style_set_style_property_default (const gchar *, const GValue *);
> >
> > .. that could be called from GtkRcStyle::init() and GtkRcStyle::parse()
> > to set default style properties for the rc-style.
> > Each such property entry should be marked as "weak" and as such should
> > not be able to override any explicitly defined style properties.
> >
> > It would also be convenient to be able to read style properties from
> > GtkStyle::realize() so that it would be possible to e.g. resize the
> > checkmark image to GtkCheckButton::indicator_size.
>
> I'm a little confused with what you want to do. A theme is a
> combination of theme engine and RC file. Style properties are
> meant to be set from the RC file, not the theme engine.
The engine would be able to override the *default* setting for a style
property >>per style<<. By using the "engine" clause within a "style"
declaration, the theme writer has specified that he wants the default
look of the theme engine (for that style) and that all other settings
build on the defaults of the theme engine.
An explicit style property definition in an RC-file should of course
override a default provided by a theme and/or the class (per style).
The end result that I want is backwards-compatibility with RC-files
written for my theme engine and Gtk 1.2.
I expect to get lots of supposed "bug reports" otherwise ... ;-)
Regards
--
/ Johan tiq com
-------------------------------------------------------------------------
char*s="moc qit nahoj ",c,a[40],r[40];q(p,a)char*p
;{*p=(*p?*p-1-a:rand())%24+a;}main(){l:for(c=40;--c;){q(r+c,0);q(a+c,13);
printf("\e[%d;%dH%c\n",24-r[c],c*2+1,s[a[c]]);}usleep(1<<12);goto l;}
----------------------------------------------- 218 bytes -- aj där ya --
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]