From c398e3d53396dbeb9f9e67b8886b8d916a7193b1 Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Mon, 10 Jun 2013 16:06:08 +0100 Subject: [PATCH] mac: Reposition the Events windows nicer when opening --- SparkleShare/Mac/SparkleEventLog.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/SparkleShare/Mac/SparkleEventLog.cs b/SparkleShare/Mac/SparkleEventLog.cs index 214212a4..d2fae3a6 100755 --- a/SparkleShare/Mac/SparkleEventLog.cs +++ b/SparkleShare/Mac/SparkleEventLog.cs @@ -49,13 +49,15 @@ namespace SparkleShare { int min_width = 480; int min_height = 640; + int height = (int) (NSScreen.MainScreen.Frame.Height * 0.85); + float x = (float) (NSScreen.MainScreen.Frame.Width * 0.61); - float y = (float) (NSScreen.MainScreen.Frame.Height * 0.5 - (min_height * 0.5)); + float y = (float) (NSScreen.MainScreen.Frame.Height * 0.5 - (height * 0.5)); SetFrame ( new RectangleF ( new PointF (x, y), - new SizeF (min_width, (int) (NSScreen.MainScreen.Frame.Height * 0.85))), + new SizeF (min_width, height)), true); StyleMask = (NSWindowStyle.Closable | NSWindowStyle.Miniaturizable |