Re: Widget style property from RC file.
- From: Paul Davis <paul linuxaudiosystems com>
- To: Tommi Komulainen <tommi komulainen iki fi>
- Cc: gtk-list gnome org
- Subject: Re: Widget style property from RC file.
- Date: Thu, 08 Jun 2006 14:26:45 -0400
On Thu, 2006-06-08 at 20:55 +0300, Tommi Komulainen wrote:
> On 6/8/06, Murray Cumming <murrayc murrayc com> wrote:
> > Could someone point out what I'm doing wrong in the attached test case?
> > It's meant to read a value from the rc file, to determine how a widget
> > would be drawn, making the widget themed.
> >
> > I get this output:
> >
> > example button gtype name=ExampleButton
> > example_button_class_init(): Registering example_thing style property.
> > example_button_init(): example_thing from rc file=0
>
> Instance init is too early to get style properties (though I suppose
> you could call gtk_widget_ensure_style there), you need to wait until
> 'style-set' is called. You should implement the style-set default
> handler anyway to work with theme changes.
>
> Unless you change widget hierarchies based on the style property it
> should be enough to access the property in size-request, size-allocate
> and expose.
or call widget::ensure_style()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]