Mercurial > audlegacy
changeset 3250:2d43219d2799
solve always broken ui_skinned_textbox_resize_relative
author | Tomasz Mon <desowin@gmail.com> |
---|---|
date | Sun, 05 Aug 2007 12:17:07 +0200 |
parents | eff2e785e3b4 |
children | f02623377013 |
files | src/audacious/ui_playlist.c src/audacious/ui_skinned_textbox.c src/audacious/ui_skinned_textbox.h |
diffstat | 3 files changed, 3 insertions(+), 18 deletions(-) [+] |
line wrap: on
line diff
--- a/src/audacious/ui_playlist.c Sun Aug 05 11:23:35 2007 +0200 +++ b/src/audacious/ui_playlist.c Sun Aug 05 12:17:07 2007 +0200 @@ -661,7 +661,6 @@ 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); playlistwin_update_sinfo(playlist_get_active()); ui_skinned_button_move_relative(playlistwin_shade, dx, 0); @@ -680,6 +679,8 @@ playlistwin_set_mask(); + gtk_widget_set_size_request(playlistwin_sinfo, playlistwin_get_width() - 35, + bmp_active_skin->properties.textbox_bitmap_font_height); GList *iter; for (iter = GTK_FIXED (SKINNED_WINDOW(playlistwin)->fixed)->children; iter; iter = g_list_next (iter)) { GtkFixedChild *child_data = (GtkFixedChild *) iter->data;
--- a/src/audacious/ui_skinned_textbox.c Sun Aug 05 11:23:35 2007 +0200 +++ b/src/audacious/ui_skinned_textbox.c Sun Aug 05 12:17:07 2007 +0200 @@ -64,7 +64,6 @@ GdkPixmap *pixmap; gboolean scroll_allowed, scroll_enabled; gint scroll_dummy; - gint resize_width; gint move_x, move_y; }; @@ -165,7 +164,6 @@ static void ui_skinned_textbox_init(UiSkinnedTextbox *textbox) { UiSkinnedTextboxPrivate *priv = UI_SKINNED_TEXTBOX_GET_PRIVATE(textbox); - priv->resize_width = 0; priv->move_x = 0; priv->move_y = 0; } @@ -265,16 +263,12 @@ 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)) { - textbox->width += priv->resize_width; - priv->resize_width = 0; + textbox->width = widget->allocation.width/(priv->double_size ? 2 : 1); 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)); - } else if (priv->resize_width == 0) - textbox->width = widget->allocation.width/(priv->double_size ? 2 : 1); } } @@ -435,10 +429,6 @@ static void ui_skinned_textbox_redraw(UiSkinnedTextbox *textbox) { UiSkinnedTextboxPrivate *priv = UI_SKINNED_TEXTBOX_GET_PRIVATE(textbox); - if (priv->resize_width) - gtk_widget_set_size_request(GTK_WIDGET(textbox), - (textbox->width+priv->resize_width)*(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); @@ -890,8 +880,3 @@ priv->move_x += x; priv->move_y += y; } - -void ui_skinned_textbox_resize_relative(GtkWidget *widget, gint w) { - UiSkinnedTextboxPrivate *priv = UI_SKINNED_TEXTBOX_GET_PRIVATE(widget); - priv->resize_width += w; -}
--- a/src/audacious/ui_skinned_textbox.h Sun Aug 05 11:23:35 2007 +0200 +++ b/src/audacious/ui_skinned_textbox.h Sun Aug 05 12:17:07 2007 +0200 @@ -62,7 +62,6 @@ 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); #ifdef __cplusplus }