Reputation: 49
I set background image for a button by:
bg_pixmap[NORMAL] = "img.png"
but most of the times the image is offset with certain x, y when:
how can I specify the background image to alway start from 0, 0 of the button?
EDIT
it seems bg_pixmap is always tiling start from 0, 0 of the window ( but shown only in the button area )....
but when I use bg_pixmap on widgets not has state changes (only NORMAL image is shown), the image is aligned correctly... (e.g. drawing area, event box, etc...)
Upvotes: 0
Views: 1350
Reputation: 49
WORKAROUND
I worked around this and make an "image button" works with rc style file:
add GtkButton inside an EventBox EventBox -> Visible Window = Yes ( No won't make it work )
Upvotes: 0
Reputation: 11
Looks that Gdk::Window::set_back_pixmap is the function you are looking for. Point is the parent_relative boolean that change the tiling starting point.
C. F.
Upvotes: 1