Re: Gtk::Style usage help needed



On Fri, 2010-10-29 at 00:40 -0700, siagogam wrote: 
> Yes I've already tried in my test example the Gtk::Style::create() and works
> fine, but what I want to do is overload the style drawing functions in order
> to perform some changes in the way some widgets are drawn. I can not do that
> using the create static method.

As Paul said, users normally determine the look of applications on their
desktop by selecting themes themselves.  If you should still want to
modify how widgets are drawn for some reason, the best way to do it, I
think, is by using the various style manipulating methods in the
Gtk::Widget API[1] such as get_style()[2], set_style()[3] and
modify_style()[4] among others.

[1] http://library.gnome.org/devel/gtkmm/stable/classGtk_1_1Widget.html
[2]
http://library.gnome.org/devel/gtkmm/stable/classGtk_1_1Widget.html#a3a3c08d5fcb8a134fff5e3f3a11f4f7f
[3]
http://library.gnome.org/devel/gtkmm/stable/classGtk_1_1Widget.html#a50ef706c909b415894aab77663447af3
[4]
http://library.gnome.org/devel/gtkmm/stable/classGtk_1_1Widget.html#a8fe55b3cc4342ae1242b384b2de813bd

> 
> I'm not sure of whats rcstyle for, but I think its for defining the system
> apearance through an rc style file. is this true? Anyway, thats not what I'm
> looking for.
> 
> Gtk::Style offers lots of protected virtual methods, so its' designed to be
> inherited, but in the other hand the label style seems to depend on the code
> executed in the create() method, that can not be overloaded. Is this a bug?
> 
> TIA

-- 
José





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