[Xfce4-commits] <postler:master> Determine default size of content window relative to monitor

Christian Dywan noreply at xfce.org
Sat Jul 10 00:24:14 CEST 2010


Updating branch refs/heads/master
         to 0e26601c27564aca8a2d5391d992863f71bd8537 (commit)
       from 3b5e9cf2b057c5cac26fa4e29b06d3ccafcf74be (commit)

commit 0e26601c27564aca8a2d5391d992863f71bd8537
Author: Christian Dywan <christian at twotoasts.de>
Date:   Wed Jun 30 19:12:09 2010 +0200

    Determine default size of content window relative to monitor

 postler/postler-reader.vala |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/postler/postler-reader.vala b/postler/postler-reader.vala
index b552f57..03f746b 100644
--- a/postler/postler-reader.vala
+++ b/postler/postler-reader.vala
@@ -116,9 +116,10 @@ public class Postler.Reader {
             window.set_icon_name (icon_name);
             window.set_title (title);
             var screen = window.get_screen ();
-            double window_width = screen.get_width () / 2.2;
-            double window_height = screen.get_height () / 2.2;
-            window.set_default_size ((int)window_width, (int)window_height);
+            Gdk.Rectangle monitor;
+            screen.get_monitor_geometry (0, out monitor);
+            double window_width = monitor.width / 2.2;
+            window.set_default_size ((int)window_width, (int)(monitor.height / 2.2));
             var shelf = new Gtk.VBox (false, 0);
             window.add (shelf);
             /* TODO: menubar, toolbar */



More information about the Xfce4-commits mailing list