diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gtk-util-routines.c | 9 | ||||
-rw-r--r-- | src/gtk-util-routines.h | 1 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/gtk-util-routines.c b/src/gtk-util-routines.c index 8fd9fecb..f709921d 100644 --- a/src/gtk-util-routines.c +++ b/src/gtk-util-routines.c @@ -98,3 +98,12 @@ void set_active(GtkWidget *tb, int active) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(tb), active); } + + +void redraw_widget(GtkWidget *wid) +{ + gint w, h; + w = gtk_widget_get_allocated_width(GTK_WIDGET(wid)); + h = gtk_widget_get_allocated_height(GTK_WIDGET(wid)); + gtk_widget_queue_draw_area(GTK_WIDGET(wid), 0, 0, w, h); +} diff --git a/src/gtk-util-routines.h b/src/gtk-util-routines.h index 4fa782e9..eb25dfc8 100644 --- a/src/gtk-util-routines.h +++ b/src/gtk-util-routines.h @@ -37,5 +37,6 @@ extern unsigned int get_uint(GtkWidget *entry); extern float get_float(GtkWidget *entry); extern int i_maybe_disable(GtkWidget *toggle, GtkWidget *widget); extern void set_active(GtkWidget *tb, int active); +extern void redraw_widget(GtkWidget *wid); #endif |