[banshee] NowPlaying: Fix resizing fullscreen control bar (bgo#641000)



commit d3f40142661971bd2713eced01c967bd21134661
Author: Zhou Ting <ting z zhou intel com>
Date:   Mon Jan 31 13:53:06 2011 +0800

    NowPlaying: Fix resizing fullscreen control bar (bgo#641000)
    
    Signed-off-by: Gabriel Burt <gabriel burt gmail com>

 .../Banshee.NowPlaying/FullscreenWindow.cs         |    8 ++++++++
 .../Banshee.NowPlaying/OverlayWindow.cs            |    4 +++-
 2 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/src/Extensions/Banshee.NowPlaying/Banshee.NowPlaying/FullscreenWindow.cs b/src/Extensions/Banshee.NowPlaying/Banshee.NowPlaying/FullscreenWindow.cs
index 2a48f4b..dc57fde 100644
--- a/src/Extensions/Banshee.NowPlaying/Banshee.NowPlaying/FullscreenWindow.cs
+++ b/src/Extensions/Banshee.NowPlaying/Banshee.NowPlaying/FullscreenWindow.cs
@@ -126,6 +126,14 @@ namespace Banshee.NowPlaying
             Gdk.Rectangle bounds = screen.GetMonitorGeometry (monitor);
             Move (bounds.X, bounds.Y);
             Resize (bounds.Width, bounds.Height);
+
+            if (controls != null) {
+                int width, height;
+                controls.GetSize(out width, out height);
+                if (width > bounds.Width) {
+                    controls.Resize(bounds.Width, height);
+                }
+            }
         }
 
         protected override void OnRealized ()
diff --git a/src/Extensions/Banshee.NowPlaying/Banshee.NowPlaying/OverlayWindow.cs b/src/Extensions/Banshee.NowPlaying/Banshee.NowPlaying/OverlayWindow.cs
index 371fde0..0f6ba0e 100644
--- a/src/Extensions/Banshee.NowPlaying/Banshee.NowPlaying/OverlayWindow.cs
+++ b/src/Extensions/Banshee.NowPlaying/Banshee.NowPlaying/OverlayWindow.cs
@@ -105,7 +105,9 @@ namespace Banshee.NowPlaying
             }
 
             if (width_scale > 0 && width_scale <= 1 && TransientFor != null) {
-                requisition.Width = (int)(TransientFor.Allocation.Width * width_scale);
+                int monitor_num = Screen.GetMonitorAtWindow (TransientFor.GdkWindow);
+                Gdk.Rectangle monitor = Screen.GetMonitorGeometry (monitor_num < 0 ? 0 : monitor_num);
+                requisition.Width = (int)(monitor.Width * width_scale);
             }
         }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]