Background pixmap for GtkHScale widget



gtk-list:

We were given the attached image track.png by our
graphic designer which we would like to use as a background
pixmap in a GtkHScale widget. This image should be used
to display the "track" of the widget. I'm not sure "track"
is the right term - "trough" may be the correct term. I'm
not sure. I mean the part of the widget on which the 
thumb image sits, or the "track" on which the thumb image slides
along. For the purposes of this email, I'll call
it a "track".

As you can see, however, track.png is 15(w) x 10(h) and
can be divided into three sections:

left end (L):  columns 0-4
middle (M):    columns 5-9
right end (R): columns 10-14

Pixels are constant along rows in the middle section, so it
if you laid middle sections side by side, you would not be able
to see any break between them.

We would *like* to have our track created by having track.png displayed
as follows:

LMMMMMMMMMMMMMMMMMMMMMR

I manually created an image like this and have attached it
(track_middle_copied.png).

However, when we just set the background pixmap property of the GtkHScale
widget, it is simply copying track.png end-to-end over and over. It looks
like the attached image track_end-to-end.png.

We could clip out the middle section of track.png (columns 5-9) and just
use that 5x10 image as our background pixmap. We have done that and
it works fine, but of course, the resulting track does not have nice
tapered ends.

Are there any additional properties of GtkHScale (or one of its parents in
the widget hierarchy) that we could set to accomplish what we want? Or do
we just have to live with not having the ends of our track look different
than the middle?

Thanks in advance for your help. 

Eric

=============================================
Eric Hyche (ehyche real com)
Technical Lead
RealNetworks, Inc. 

Attachment: track.png
Description: PNG image

Attachment: track_end-to-end.png
Description: PNG image

Attachment: track_middle_copied.png
Description: PNG image



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