From dc2a78ba647c1d7f4806f8750bea6174c1eb0e86 Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Sun, 10 Apr 2016 20:14:41 -0700 Subject: [PATCH] linux event log: Fix default window position --- SparkleShare/Linux/EventLog.cs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/SparkleShare/Linux/EventLog.cs b/SparkleShare/Linux/EventLog.cs index 88d92274..57b37211 100755 --- a/SparkleShare/Linux/EventLog.cs +++ b/SparkleShare/Linux/EventLog.cs @@ -38,7 +38,7 @@ namespace SparkleShare { private Spinner spinner; // private WebView web_view; - private int pos_x, pos_y; + int pos_x, pos_y; public EventLog () : base ("Recent Changes") @@ -48,13 +48,14 @@ namespace SparkleShare { TypeHint = Gdk.WindowTypeHint.Dialog; IconName = "org.sparkleshare.SparkleShare"; - Gdk.Rectangle monitor_0_rect = Gdk.Screen.Default.GetMonitorGeometry (0); SetSizeRequest (480, 640); - Resize (480, (int)(monitor_0_rect.Height * 0.8)); - this.pos_x = (int) (monitor_0_rect.Width * 0.61); - this.pos_y = (int) (monitor_0_rect.Height * 0.5 - (AllocatedHeight * 0.5)); - + Gdk.Rectangle monitor_0_rect = Gdk.Screen.Default.GetMonitorGeometry (0); + pos_x = (int) (monitor_0_rect.Width * 0.61); + pos_y = (int) (monitor_0_rect.Height * 0.5 - (HeightRequest * 0.5)); + + Resize (480, (int) (monitor_0_rect.Height * 0.8)); + this.size_label = new Label () { Xalign = 0, Markup = "Size: …" }; this.history_label = new Label () { Xalign = 0, Markup = "History: …" }; @@ -110,7 +111,7 @@ namespace SparkleShare { Controller.ShowWindowEvent += delegate { Application.Invoke (delegate { - Move (this.pos_x, this.pos_y); + Move (pos_x, pos_y); ShowAll (); Present (); });