# HG changeset patch # User Tomasz Mon # Date 1186063832 -7200 # Node ID bb7f5adc167778b128758bccafb651fdadd3468d # Parent 9583cd62231f06c2960e0695aaba132e7b854b97 I hope textbox_resize_relative is now working propertly diff -r 9583cd62231f -r bb7f5adc1677 src/audacious/ui_playlist.c --- a/src/audacious/ui_playlist.c Thu Aug 02 15:40:46 2007 +0200 +++ b/src/audacious/ui_playlist.c Thu Aug 02 16:10:32 2007 +0200 @@ -664,7 +664,7 @@ ui_skinned_playlist_slider_move_relative(playlistwin_slider, dx); ui_skinned_playlist_slider_resize_relative(playlistwin_slider, dy); - ui_skinned_textbox_resize_relative(playlistwin_sinfo, dx, 0); + ui_skinned_textbox_resize_relative(playlistwin_sinfo, dx); playlistwin_update_sinfo(playlist_get_active()); ui_skinned_button_move_relative(playlistwin_shade, dx, 0); diff -r 9583cd62231f -r bb7f5adc1677 src/audacious/ui_skinned_textbox.c --- a/src/audacious/ui_skinned_textbox.c Thu Aug 02 15:40:46 2007 +0200 +++ b/src/audacious/ui_skinned_textbox.c Thu Aug 02 16:10:32 2007 +0200 @@ -64,7 +64,7 @@ GdkPixmap *pixmap; gboolean scroll_allowed, scroll_enabled; gint scroll_dummy; - gint resize_width, resize_height; + gint resize_width; gint move_x, move_y; }; @@ -166,7 +166,6 @@ static void ui_skinned_textbox_init(UiSkinnedTextbox *textbox) { UiSkinnedTextboxPrivate *priv = UI_SKINNED_TEXTBOX_GET_PRIVATE(textbox); priv->resize_width = 0; - priv->resize_height = 0; priv->move_x = 0; priv->move_y = 0; } @@ -266,14 +265,15 @@ textbox->y = widget->allocation.y/(priv->double_size ? 2 : 1); if (textbox->width != widget->allocation.width/(priv->double_size ? 2 : 1)) { - if (textbox->width + priv->resize_width == widget->allocation.width/(priv->double_size ? 2 : 1)) + if (textbox->width + priv->resize_width == widget->allocation.width/(priv->double_size ? 2 : 1)) { + textbox->width += priv->resize_width; priv->resize_width = 0; - textbox->width = widget->allocation.width/(priv->double_size ? 2 : 1); - priv->resize_height = 0; - if (priv->pixmap_text) g_free(priv->pixmap_text); - priv->pixmap_text = NULL; - priv->offset = 0; - gtk_widget_queue_draw(GTK_WIDGET(textbox)); + if (priv->pixmap_text) g_free(priv->pixmap_text); + priv->pixmap_text = NULL; + priv->offset = 0; + gtk_widget_set_size_request(widget, textbox->width, textbox->height); + gtk_widget_queue_draw(GTK_WIDGET(textbox)); + } } } @@ -431,10 +431,10 @@ static void ui_skinned_textbox_redraw(UiSkinnedTextbox *textbox) { UiSkinnedTextboxPrivate *priv = UI_SKINNED_TEXTBOX_GET_PRIVATE(textbox); - if (priv->resize_width || priv->resize_height) + if (priv->resize_width) gtk_widget_set_size_request(GTK_WIDGET(textbox), (textbox->width+priv->resize_width)*(1+priv->double_size), - (textbox->height+priv->resize_height)*(1+priv->double_size)); + (textbox->height)*(1+priv->double_size)); if (priv->move_x || priv->move_y) gtk_fixed_move(GTK_FIXED(priv->fixed), GTK_WIDGET(textbox), textbox->x+priv->move_x, textbox->y+priv->move_y); @@ -887,8 +887,7 @@ priv->move_y += y; } -void ui_skinned_textbox_resize_relative(GtkWidget *widget, gint w, gint h) { +void ui_skinned_textbox_resize_relative(GtkWidget *widget, gint w) { UiSkinnedTextboxPrivate *priv = UI_SKINNED_TEXTBOX_GET_PRIVATE(widget); priv->resize_width += w; - priv->resize_height += h; } diff -r 9583cd62231f -r bb7f5adc1677 src/audacious/ui_skinned_textbox.h --- a/src/audacious/ui_skinned_textbox.h Thu Aug 02 15:40:46 2007 +0200 +++ b/src/audacious/ui_skinned_textbox.h Thu Aug 02 16:10:32 2007 +0200 @@ -62,7 +62,7 @@ void ui_skinned_textbox_set_text(GtkWidget *widget, const gchar *text); void ui_skinned_textbox_set_scroll(GtkWidget *widget, gboolean scroll); void ui_skinned_textbox_move_relative(GtkWidget *widget, gint x, gint y); -void ui_skinned_textbox_resize_relative(GtkWidget *widget, gint w, gint h); +void ui_skinned_textbox_resize_relative(GtkWidget *widget, gint w); #ifdef __cplusplus }