Draw background before drawing toolbar bitmap.
The background may not have been painted for us.
This commit is contained in:
@@ -195,6 +195,8 @@ image_expose_event(GtkWidget* widget, GdkEventExpose*, wxToolBarTool* tool)
|
|||||||
int x = (alloc.width - bitmap.GetScaledWidth()) / 2;
|
int x = (alloc.width - bitmap.GetScaledWidth()) / 2;
|
||||||
int y = (alloc.height - bitmap.GetScaledHeight()) / 2;
|
int y = (alloc.height - bitmap.GetScaledHeight()) / 2;
|
||||||
#ifdef __WXGTK3__
|
#ifdef __WXGTK3__
|
||||||
|
gtk_render_background(gtk_widget_get_style_context(widget),
|
||||||
|
cr, alloc.x, alloc.y, alloc.width, alloc.height);
|
||||||
bitmap.Draw(cr, x, y);
|
bitmap.Draw(cr, x, y);
|
||||||
#else
|
#else
|
||||||
x += alloc.x;
|
x += alloc.x;
|
||||||
|
Reference in New Issue
Block a user