diff options
author | 2011-10-09 11:55:27 +0200 | |
---|---|---|
committer | 2011-10-09 11:55:27 +0200 | |
commit | 7fed8ecd54d5004cabc38f634d0efb32840f4cb5 (patch) | |
tree | 37ee6c6fee99dae02aa0ed8d55f433df9cb4ef70 /plugins/gtkui/callbacks.c | |
parent | 1c89b325521ccd180b4e1248a44f8f25edfc4e0f (diff) |
fixed seekbar and volumebar drawing in gtkui3
Diffstat (limited to 'plugins/gtkui/callbacks.c')
-rw-r--r-- | plugins/gtkui/callbacks.c | 30 |
1 files changed, 7 insertions, 23 deletions
diff --git a/plugins/gtkui/callbacks.c b/plugins/gtkui/callbacks.c index b871ee1e..12cbcc19 100644 --- a/plugins/gtkui/callbacks.c +++ b/plugins/gtkui/callbacks.c @@ -514,6 +514,13 @@ seekbar_draw (GtkWidget *widget, cairo_t *cr) { if (!widget) { return; } + +#if GTK_CHECK_VERSION(3,0,0) + GtkAllocation allocation; + gtk_widget_get_allocation (widget, &allocation); + cairo_translate (cr, -allocation.x, -allocation.y); +#endif + GdkColor clr_selection, clr_back; gtkui_get_bar_foreground_color (&clr_selection); gtkui_get_bar_background_color (&clr_back); @@ -578,27 +585,6 @@ seekbar_draw (GtkWidget *widget, cairo_t *cr) { } } -#if 0 -void -seekbar_expose (GtkWidget *widget, int x, int y, int w, int h) { - gdk_draw_drawable (widget->window, widget->style->black_gc, seekbar_backbuf, x, y, x, y, w, h); -} - -gboolean -on_seekbar_configure_event (GtkWidget *widget, - GdkEventConfigure *event, - gpointer user_data) -{ - if (seekbar_backbuf) { - g_object_unref (seekbar_backbuf); - seekbar_backbuf = NULL; - } - seekbar_backbuf = gdk_pixmap_new (widget->window, widget->allocation.width, widget->allocation.height, -1); - seekbar_draw (widget); - return FALSE; -} -#endif - gboolean on_seekbar_motion_notify_event (GtkWidget *widget, GdkEventMotion *event) @@ -652,8 +638,6 @@ void seekbar_redraw (void) { GtkWidget *widget = lookup_widget (mainwin, "seekbar"); gtk_widget_queue_draw (widget); - //seekbar_draw (widget); - //seekbar_expose (widget, 0, 0, widget->allocation.width, widget->allocation.height); } gboolean |