Re: [Vala] Gtk Custom widget: drawing with "gtk theme" colours



Hello
The following example extracts the Gdk.Color color from the widget's
style. 'this' is a Gtk.Widget in this example. 

Gtk.Style style;
style = Gtk.rc_get_style(this);
Gdk.Color color = style.base[Gtk.StateType.INSENSITIVE];
this.modify_base(Gtk.StateType.NORMAL, color);

Check the Gtk.Style. It contains all theme colors.
Regards
Jörn



Hey All,

I've designed a couple of widgets now, (in various languanges: python C++
Vala)
and googled for many tutorials regarding how to draw custom widgets in the
GTK theme
colours. I havent found any example code, or tutorial yet...

I hope somebody has a pointer on how I can "extract" the colours from the
current theme?
Cheers, -Harry
_______________________________________________
vala-list mailing list
vala-list gnome org
http://mail.gnome.org/mailman/listinfo/vala-list





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]