On Mon, 13 Aug 2012 16:55:00 +0100 Emmanuele Bassi <eba...@gmail.com> wrote:
>hi; > >On 13 August 2012 16:33, zentara <zzmilosc...@gmail.com> wrote: >> I'm trying to utilize the c functions: >> >> gtk_widget_override_color() >> gtk_widget_override_background_color() > >not a great plan; if you want to modify the style, use an app-specific >StyleContext I do know how to do it with a CssProvider, but the C docs mention the override methods, and it would be useful to have for multiple widgets. For instance to have 2 textviews, each with a different background. > >> The problem I'm facing is that a blessed Gdk::RGBA object is required. >> How do I do it? > >> I tried this ( with a few variations) : >> >> $textview1->override_background_color('normal', Gtk3::Gdk::RGBA( 0,0,0,1 ) ); >> >> but no luck. >> >> Any clues on how to create the RGBA object? > >a RGBA object is just a boxed type, like the Color object in Gtk2, so >Gtk3::Gdk::RGBA->new(0, 0, 1, 1,) should work. if it doesn't, it means >you need to add an override. > >ciao, > Emmanuele. Gtk3::Gdk::RGBA->new() dosn't work, can't find method new. It looks like it needs an override, thanks for the tip. 0m, zentara _______________________________________________ gtk-perl-list mailing list gtk-perl-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-perl-list