From 30bd28fa43f56314a2ee79e7fdb11797249b9524 Mon Sep 17 00:00:00 2001 From: Jack Leigh Date: Thu, 26 Sep 2013 15:58:36 +0100 Subject: [PATCH] Fix 'Recent Changes' dialog placement On multi-monitor setups this was messed up, especially if one monitor is below the other. Now get dimensions of 1st monitor and place based on those. Preserve existing (strange?) placement logic. Use SetDefaultSize rather than SetSizeRequest to allow resizing. --- SparkleShare/Linux/SparkleEventLog.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/SparkleShare/Linux/SparkleEventLog.cs b/SparkleShare/Linux/SparkleEventLog.cs index 0601f0ea..6ad0bb7c 100755 --- a/SparkleShare/Linux/SparkleEventLog.cs +++ b/SparkleShare/Linux/SparkleEventLog.cs @@ -44,10 +44,11 @@ namespace SparkleShare { public SparkleEventLog () : base ("") { - SetSizeRequest (480, (int) (Gdk.Screen.Default.Height * 0.8)); + Gdk.Rectangle monitor_0_rect = Gdk.Screen.Default.GetMonitorGeometry(0); + SetDefaultSize (480, (int) (monitor_0_rect.Height * 0.8)); - int x = (int) (Gdk.Screen.Default.Width * 0.61); - int y = (int) (Gdk.Screen.Default.Height * 0.5 - (HeightRequest * 0.5)); + int x = (int) (monitor_0_rect.Width * 0.61); + int y = (int) (monitor_0_rect.Height * 0.5 - (HeightRequest * 0.5)); Move (x, y);