# HG changeset patch # User Tomasz Mon # Date 1186752575 -7200 # Node ID 6cadc2ddf4cd732cc10c1f2d26cb3c4bdfc6c072 # Parent 00286cde2485208ec88d439c6bb69c39ad18e75b revise 19ad8ea66a03: fix skins with non-standard size posbar diff -r 00286cde2485 -r 6cadc2ddf4cd src/audacious/skin.c --- a/src/audacious/skin.c Fri Aug 10 15:14:20 2007 +0200 +++ b/src/audacious/skin.c Fri Aug 10 15:29:35 2007 +0200 @@ -173,6 +173,11 @@ playlistwin_update_list(playlist_get_active()); + SkinPixmap *pixmap; + pixmap = &bmp_active_skin->pixmaps[SKIN_POSBAR]; + /* last 59 pixels of SKIN_POSBAR are knobs (normal and selected) */ + gtk_widget_set_size_request(mainwin_position, pixmap->width - 59, pixmap->height); + return TRUE; } @@ -1639,9 +1644,6 @@ gdk_draw_drawable(drawable, gc, skin_get_pixmap(bmp_active_skin, SKIN_MAIN)->pixmap, 212 + xdest, 41, xdest, ydest, width, height); height = pixmap->height/2; - } else if (pixmap_id == SKIN_POSBAR) { - /* last 59 pixels of SKIN_POSBAR are knobs (normal and selected) */ - gtk_widget_set_size_request(mainwin_position, pixmap->width - 59, pixmap->height); } else return; } diff -r 00286cde2485 -r 6cadc2ddf4cd src/audacious/ui_skinned_horizontal_slider.c --- a/src/audacious/ui_skinned_horizontal_slider.c Fri Aug 10 15:14:20 2007 +0200 +++ b/src/audacious/ui_skinned_horizontal_slider.c Fri Aug 10 15:29:35 2007 +0200 @@ -219,6 +219,11 @@ widget->allocation = *allocation; widget->allocation.x *= (1+priv->double_size); widget->allocation.y *= (1+priv->double_size); + if (priv->knob_height == priv->height) + priv->knob_height = allocation->height; + priv->width = allocation->width; + priv->height = allocation->height; + if (GTK_WIDGET_REALIZED (widget)) gdk_window_move_resize(widget->window, widget->allocation.x, widget->allocation.y, allocation->width, allocation->height);