Re: Background image for a window



Hmm, I can set the bg for the widget as well, but I can't rely on a patched
module install since this will be used on end-user machines (running
different distros, gtk2-perl versions etc)
Is there any other way?

thanks,
Chris

On Wed, Feb 09, 2005 at 08:24:12AM -0500, muppet wrote in a legally binding way:
Date: Wed, 09 Feb 2005 08:24:12 -0500
From: muppet <scott asofyet org>
To: Chris Debenham Sun COM
Cc: gtk-perl-list gnome org
Subject: Re: Background image for a window


On Feb 9, 2005, at 12:20 AM, Chris Debenham - PTS Engineer wrote:

I want to put an image in the background of a window with text labels 
over it.
In Gtk1 i used:
$window_style->bg_pixmap('normal', $pixmap);
$window->window->set_back_pixmap($pixmap, 0);

but this fails in GTK2
(error message:"Usage: Gtk2::Style::bg_pixmap(style, state)")

Is there a better/proper way to do this?

setting the pixmap in the style (with the duplicate style and attach 
and all that) should be sufficient; but, as you see, we have that bound 
only as an accessor, not as a mutator.  attached is a patch that would 
make that work.

just setting the backing pixmap on the gdk window will not really be 
enough, because the widget style will paint right over top of it.






--
I think it worked on the Wiley Coyote model of project management - if
at any point you looked down and realised what you were doing was
impossible then you'd instantly fail.
  -- Simon Wistow


-- 
-------------------------------------------------------------------------------
  ,-_|\  PTS Engineer                        E-mail : chris debenham sun com
 /     \ Sun Microsystems Australia Pty Ltd. Direct : +61 (2) 9844 5188
 \_,-\_* 828 Pacific Highway                 Phone  : +61 (2) 9844 5000
      v  Gordon, N.S.W. 2072                 Fax    : +61 (2) 9844 5189
                                             Mobile : +61 (40) 9844 514
-------------------------------------------------------------------------------
All Computers Run At The Same Speed...With The Power Off.



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