changeset 1878:f83d206f51b7 trunk

[svn] - Properly handle shading when mainwin_width is greater than the shaded width.
author nhjm449
date Sat, 14 Oct 2006 18:50:37 -0700
parents 9f2b7ac55dec
children 104fe1a701b9
files ChangeLog audacious/mainwin.c audacious/mainwin.h
diffstat 3 files changed, 21 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sat Oct 14 12:04:49 2006 -0700
+++ b/ChangeLog	Sat Oct 14 18:50:37 2006 -0700
@@ -1,3 +1,11 @@
+2006-10-14 19:04:49 +0000  William Pitcock <nenolod@nenolod.net>
+  revision [2711]
+  - bump to 1.2.0-rc4
+  
+  trunk/configure.ac |    2 +-
+  1 file changed, 1 insertion(+), 1 deletion(-)
+
+
 2006-10-14 19:03:26 +0000  William Pitcock <nenolod@nenolod.net>
   revision [2709]
   - objectify libintl
--- a/audacious/mainwin.c	Sat Oct 14 12:04:49 2006 -0700
+++ b/audacious/mainwin.c	Sat Oct 14 18:50:37 2006 -0700
@@ -952,16 +952,16 @@
 		bmp_active_skin->properties.mainwin_about_y);
 
     if (bmp_active_skin->properties.mainwin_minimize_x && bmp_active_skin->properties.mainwin_minimize_y)
-	widget_move(WIDGET(mainwin_minimize), bmp_active_skin->properties.mainwin_minimize_x,
-		bmp_active_skin->properties.mainwin_minimize_y);
+	widget_move(WIDGET(mainwin_minimize), cfg.player_shaded ? 244 : bmp_active_skin->properties.mainwin_minimize_x,
+		cfg.player_shaded ? 3 : bmp_active_skin->properties.mainwin_minimize_y);
 
     if (bmp_active_skin->properties.mainwin_shade_x && bmp_active_skin->properties.mainwin_shade_y)
-	widget_move(WIDGET(mainwin_shade), bmp_active_skin->properties.mainwin_shade_x,
-		bmp_active_skin->properties.mainwin_shade_y);
+	widget_move(WIDGET(mainwin_shade), cfg.player_shaded ? 254 : bmp_active_skin->properties.mainwin_shade_x,
+		cfg.player_shaded ? 3 : bmp_active_skin->properties.mainwin_shade_y);
 
     if (bmp_active_skin->properties.mainwin_close_x && bmp_active_skin->properties.mainwin_close_y)
-	widget_move(WIDGET(mainwin_close), bmp_active_skin->properties.mainwin_close_x,
-		bmp_active_skin->properties.mainwin_close_y);
+	widget_move(WIDGET(mainwin_close), cfg.player_shaded ? 264 : bmp_active_skin->properties.mainwin_close_x,
+		cfg.player_shaded ? 3 : bmp_active_skin->properties.mainwin_close_y);
 
     /* visibility attributes */
     if (bmp_active_skin->properties.mainwin_menurow_visible)
@@ -998,17 +998,17 @@
 	}
 
         gdk_window_set_hints(mainwin->window, 0, 0,
-                                bmp_active_skin->properties.mainwin_width,
+                                cfg.player_shaded ? MAINWIN_SHADED_WIDTH : bmp_active_skin->properties.mainwin_width,
                                 cfg.player_shaded ? MAINWIN_SHADED_HEIGHT : bmp_active_skin->properties.mainwin_height,
-                                bmp_active_skin->properties.mainwin_width,
+                                cfg.player_shaded ? MAINWIN_SHADED_WIDTH : bmp_active_skin->properties.mainwin_width,
                                 cfg.player_shaded ? MAINWIN_SHADED_HEIGHT : bmp_active_skin->properties.mainwin_height,
                                 GDK_HINT_MIN_SIZE | GDK_HINT_MAX_SIZE);
-        gdk_window_resize(mainwin->window, bmp_active_skin->properties.mainwin_width,
+        gdk_window_resize(mainwin->window, cfg.player_shaded ? MAINWIN_SHADED_WIDTH : bmp_active_skin->properties.mainwin_width,
 		cfg.player_shaded ? MAINWIN_SHADED_HEIGHT : bmp_active_skin->properties.mainwin_height);
         gdk_window_set_hints(mainwin->window, 0, 0,
-                                bmp_active_skin->properties.mainwin_width,
+                                cfg.player_shaded ? MAINWIN_SHADED_WIDTH : bmp_active_skin->properties.mainwin_width,
                                 cfg.player_shaded ? MAINWIN_SHADED_HEIGHT : bmp_active_skin->properties.mainwin_height,
-                                bmp_active_skin->properties.mainwin_width,
+                                cfg.player_shaded ? MAINWIN_SHADED_WIDTH : bmp_active_skin->properties.mainwin_width,
                                 cfg.player_shaded ? MAINWIN_SHADED_HEIGHT : bmp_active_skin->properties.mainwin_height,
                                 GDK_HINT_MIN_SIZE | GDK_HINT_MAX_SIZE);
 	g_object_unref(mainwin_bg);
@@ -3499,7 +3499,7 @@
     gtk_window_set_role(GTK_WINDOW(mainwin), "player");
     gtk_window_set_resizable(GTK_WINDOW(mainwin), FALSE);
 
-    width = bmp_active_skin->properties.mainwin_width;
+    width = cfg.player_shaded ? MAINWIN_SHADED_WIDTH : bmp_active_skin->properties.mainwin_width;
     height = cfg.player_shaded ? MAINWIN_SHADED_HEIGHT : bmp_active_skin->properties.mainwin_height;
 
     gtk_widget_set_size_request(mainwin, width, height);
--- a/audacious/mainwin.h	Sat Oct 14 12:04:49 2006 -0700
+++ b/audacious/mainwin.h	Sat Oct 14 18:50:37 2006 -0700
@@ -30,6 +30,7 @@
 #define MAINWIN_WIDTH            (gint)275
 #define MAINWIN_HEIGHT           (gint)116
 #define MAINWIN_TITLEBAR_HEIGHT  (gint)14
+#define MAINWIN_SHADED_WIDTH     MAINWIN_WIDTH
 #define MAINWIN_SHADED_HEIGHT    MAINWIN_TITLEBAR_HEIGHT
 
 #define MAINWIN_UPDATE_INTERVAL  10