Re: Gtk2::Style set methods
- From: Thierry Vignaud <tvignaud mandrakesoft com>
- To: GTK-Perl ML <gtk-perl-list gnome org>
- Subject: Re: Gtk2::Style set methods
- Date: Tue, 25 May 2004 17:53:35 +0200
Emmanuele Bassi <bassi-e libero it> writes:
I was asked, by someone on Usenet, how to make a widget's background
"opaque". I want with the usual "take a snapshot of the drawable in
background and play with the alpha channel" routine, but while
coding a pseudo-code example, I noticed in the Gtk2-Perl XS code
that the Gtk2::Style accessor methods are just "getters", and that
there's no way to set a, for instance, bg_pixmap, like:
$style = $widget->style->copy;
$style->bg_pixmap('normal') = $pixmap;
I've never really worked on this low-level stuff, so I could be
missing something really obvious here.
from mandrake control center, to force a color:
http://cvs.mandrakesoft.com/cgi-bin/cvsweb.cgi/soft/control-center/control-center?rev=1.533&content-type=text/x-cvsweb-markup
set the style-set handler from a higher level widget to do sg like;
$widget->set_name("my_name");
$top_widget->signal_connect("style-set", sub {
Gtk2::Rc->parse_string(join('', qq(style "my_style"
{
bg[NORMAL] = { ), join(' ,', $color->red, $color->green, $color->blue), qq( }
bg_pixmap[NORMAL] = "<none>"
}
widget "*my_name*" style "my_style"
)));
$widget->reset_rc_styles;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]