Mercurial > audlegacy
comparison src/audacious/ui_skin.c @ 4558:f6dc859e38b6
Use temporary variables for scale factors.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 19 May 2008 02:09:10 +0300 |
parents | 1fe29814b90c |
children |
comparison
equal
deleted
inserted
replaced
4557:2eee464379dc | 4558:f6dc859e38b6 |
---|---|
2035 void ui_skinned_widget_draw(GtkWidget *widget, GdkPixbuf *obj, gint width, gint height, gboolean scale) { | 2035 void ui_skinned_widget_draw(GtkWidget *widget, GdkPixbuf *obj, gint width, gint height, gboolean scale) { |
2036 g_return_if_fail(widget != NULL); | 2036 g_return_if_fail(widget != NULL); |
2037 g_return_if_fail(obj != NULL); | 2037 g_return_if_fail(obj != NULL); |
2038 | 2038 |
2039 if (scale) { | 2039 if (scale) { |
2040 GdkPixbuf *image = gdk_pixbuf_scale_simple(obj, width * cfg.scale_factor, height* cfg.scale_factor, GDK_INTERP_NEAREST); | 2040 gint s_width = width * cfg.scale_factor, |
2041 gdk_draw_pixbuf(widget->window, NULL, image, 0, 0, 0, 0, width * cfg.scale_factor , height * cfg.scale_factor, GDK_RGB_DITHER_NONE, 0, 0); | 2041 s_height = height * cfg.scale_factor; |
2042 GdkPixbuf *image = gdk_pixbuf_scale_simple(obj, s_width, s_height, GDK_INTERP_NEAREST); | |
2043 gdk_draw_pixbuf(widget->window, NULL, image, 0, 0, 0, 0, s_width, s_height, GDK_RGB_DITHER_NONE, 0, 0); | |
2042 g_object_unref(image); | 2044 g_object_unref(image); |
2043 } else { | 2045 } else { |
2044 gdk_draw_pixbuf(widget->window, NULL, obj, 0, 0, 0, 0, width, height, GDK_RGB_DITHER_NONE, 0, 0); | 2046 gdk_draw_pixbuf(widget->window, NULL, obj, 0, 0, 0, 0, width, height, GDK_RGB_DITHER_NONE, 0, 0); |
2045 } | 2047 } |
2046 } | 2048 } |