[longomatch] Make stats dialog window take an 80% of the screen



commit 8177cffd67c4498e3c60cae2845d3e688b40aae9
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Sat Nov 29 20:45:32 2014 +0100

    Make stats dialog window take an 80% of the screen

 LongoMatch.Plugins.Stats/Stats/StatsDialog.cs |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/LongoMatch.Plugins.Stats/Stats/StatsDialog.cs b/LongoMatch.Plugins.Stats/Stats/StatsDialog.cs
index 3c97df6..ee5f317 100644
--- a/LongoMatch.Plugins.Stats/Stats/StatsDialog.cs
+++ b/LongoMatch.Plugins.Stats/Stats/StatsDialog.cs
@@ -16,6 +16,7 @@
 //  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
 //
 using System;
+using Gdk;
 using LongoMatch.Core.Store;
 using LongoMatch.Core.Stats;
 
@@ -28,6 +29,14 @@ namespace LongoMatch.Plugins.Stats
                public StatsDialog ()
                {
                        this.Build ();
+                       Screen screen = Display.Default.DefaultScreen;
+                       int monitor = screen.GetMonitorAtWindow (GdkWindow);
+                       Rectangle monitor_geometry = screen.GetMonitorGeometry (monitor);
+                       Resize (monitor_geometry.Width * 80 / 100, monitor_geometry.Height * 80 / 100);
+#if OSTYPE_OS_X
+                       this.Move (monitor_geometry.Width * 10 / 100, monitor_geometry.Height * 10 / 100);
+#endif
+                       
                }
 
                protected override void OnDestroyed ()


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