changeset 2919:2abf3bb3e63d trunk

fix textbox resize
author Tomasz Mon <desowin@gmail.com>
date Fri, 29 Jun 2007 11:13:26 +0200
parents 4e71092ab29b
children 5a94507f507e 89676d0b5efc
files src/audacious/ui_skinned_textbox.c
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/audacious/ui_skinned_textbox.c	Fri Jun 29 11:00:23 2007 +0200
+++ b/src/audacious/ui_skinned_textbox.c	Fri Jun 29 11:13:26 2007 +0200
@@ -298,6 +298,14 @@
 
     textbox->x = widget->allocation.x/(priv->double_size ? 2 : 1);
     textbox->y = widget->allocation.y/(priv->double_size ? 2 : 1);
+
+    if (priv->w !=  widget->allocation.width) {
+        priv->w = widget->allocation.width;
+        if (priv->pixmap_text) g_free(priv->pixmap_text);
+        priv->pixmap_text = NULL;
+        priv->offset = 0;
+        ui_skinned_textbox_redraw(textbox);
+    }
 }
 
 static gboolean ui_skinned_textbox_textbox_press(GtkWidget *widget, GdkEventButton *event) {