summaryrefslogtreecommitdiff
path: root/libmate-panel-applet/mate-panel-applet.c
diff options
context:
space:
mode:
authorinfirit <[email protected]>2014-11-22 15:30:47 +0100
committerinfirit <[email protected]>2014-11-22 15:30:47 +0100
commitea49a097760f4757c0fafa460724f4b642d649c0 (patch)
tree2d00384d3493328e878c1aa761e0b9b742af6896 /libmate-panel-applet/mate-panel-applet.c
parentab4168815a56729801366abd329d5d47f0b0cdcf (diff)
downloadmate-panel-ea49a097760f4757c0fafa460724f4b642d649c0.tar.bz2
mate-panel-ea49a097760f4757c0fafa460724f4b642d649c0.tar.xz
Add a gtkimage with the current pixbuf to button-widget
We need to add a child to the button to get the right allocation of the pixbuf. When the button is created without a pixbuf, get_preferred_width/height are called the first time when the widget is allocated and 0x0 size is cached by gtksizerequest. Since the widget doesn't change its size when a pixbuf is set, gtk_widget_queue_resize() always uses the cached values instead of calling get_preferred_width_height() again. So the actual size, based on pixbuf size, is never used. We are overriding the draw() method, so having a child doesn't affect the widget rendering anyway. Taken from gnome-panel commit: 0b8ace11087855d741cdeed97dc839db50319ae8 from: Carlos Garcia Campos <[email protected]>
Diffstat (limited to 'libmate-panel-applet/mate-panel-applet.c')
0 files changed, 0 insertions, 0 deletions