changeset 1955:f6b058a10242 trunk

[svn] - make doublesize work with modern skins
author nenolod
date Mon, 06 Nov 2006 04:00:12 -0800
parents 8fae32163730
children fb61da4f4c23
files ChangeLog audacious/mainwin.c
diffstat 2 files changed, 21 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Mon Nov 06 00:10:47 2006 -0800
+++ b/ChangeLog	Mon Nov 06 04:00:12 2006 -0800
@@ -1,3 +1,11 @@
+2006-11-06 08:10:47 +0000  William Pitcock <nenolod@nenolod.net>
+  revision [2869]
+  - use values from the skin loader instead of constants (should make doublesize work with Osmosis)
+  
+  trunk/audacious/mainwin.c |    4 ++--
+  1 file changed, 2 insertions(+), 2 deletions(-)
+
+
 2006-11-06 06:26:49 +0000  Yoshiki Yazawa <yaz@cc.rim.or.jp>
   revision [2865]
   - build fix
--- a/audacious/mainwin.c	Mon Nov 06 00:10:47 2006 -0800
+++ b/audacious/mainwin.c	Mon Nov 06 04:00:12 2006 -0800
@@ -782,18 +782,27 @@
                 if (!w->redraw || !w->visible)
                     continue;
 
+	        if (w->x > bmp_active_skin->properties.mainwin_width ||
+		    w->y > bmp_active_skin->properties.mainwin_height)
+		    continue;
+
                 if (cfg.doublesize) {
+                    gint width, height;
+
+                    width = w->x + w->width <= bmp_active_skin->properties.mainwin_width ? w->width : (w->width - ((w->x + w->width) - bmp_active_skin->properties.mainwin_width));
+                    height = w->y + w->height <= bmp_active_skin->properties.mainwin_width ? w->height : (w->height - ((w->y + w->height) - bmp_active_skin->properties.mainwin_height));
+
                     img = gdk_drawable_get_image(mainwin_bg, w->x, w->y,
-                                                 w->width, w->height);
+                                                 width, height);
                     img2x = create_dblsize_image(img);
                     gdk_draw_image(mainwin_bg_x2, mainwin_gc,
                                    img2x, 0, 0, w->x << 1, w->y << 1,
-                                   w->width << 1, w->height << 1);
+                                   width << 1, height << 1);
                     gdk_image_destroy(img2x);
                     gdk_image_destroy(img);
                     gdk_window_clear_area(mainwin->window, w->x << 1,
-                                          w->y << 1, w->width << 1,
-                                          w->height << 1);
+                                          w->y << 1, width << 1,
+                                          height << 1);
                 }
                 else
                     gdk_window_clear_area(mainwin->window, w->x, w->y,