Re: Gtk::Style usage help needed
- From: siagogam <siagogam terra es>
- To: gtkmm-list gnome org
- Subject: Re: Gtk::Style usage help needed
- Date: Fri, 29 Oct 2010 11:08:42 -0700 (PDT)
Ok, I'll try to explain what I want to do, so you can tell me if I'm doing it
the way is supposed to be done.
As you said, I want to modify how widgets are drawn (by using cairo inside
the style virtual functions), and I have no intention of creating a new
complete theme engine. If all applications should share the same look is a
point of view quite extended , but what I want to do is just the opposite
(define my own look and feel in my application)
I'm trying to do it just the way you mentioned, by calling set_style in the
affected widgets. But if we recover the example code, I'm getting some pango
errors and a segfault when trying to use an overloaded Gtk::Style in a label
widget (other widgets I have tested works fine with this approach).
I've been looking to the Gtk::Style code in style.cc and the create()
function does nothing but create the Glib::RefPtr, so I'm quite confused
write now. ¿what can it be wrong?
TIA
José Alburquerque wrote:
>
> 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é
>
>
>
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkmm-list
>
>
--
View this message in context: http://old.nabble.com/Gtk%3A%3AStyle-usage-help-needed-tp30079646p30088085.html
Sent from the Gtkmm mailing list archive at Nabble.com.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]