From f185bcb42db65f7ef247453b3e7f86ffe1c95cd8 Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Wed, 12 Sep 2012 00:43:38 +0200 Subject: [PATCH] Set a sensible default window size in plain mode --- midori/main.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/midori/main.c b/midori/main.c index e17f7286..4a90e12a 100644 --- a/midori/main.c +++ b/midori/main.c @@ -2064,6 +2064,14 @@ main (int argc, GtkWidget* web_view = webkit_web_view_new (); gchar* uri = midori_prepare_uri ( (uris != NULL && uris[0]) ? uris[0] : "http://www.example.com"); + + gint width, height; + GdkRectangle monitor; + GdkScreen* screen = gtk_window_get_screen (GTK_WINDOW (window)); + gdk_screen_get_monitor_geometry (screen, 0, &monitor); + width = monitor.width / 1.7; height = monitor.height / 1.7; + gtk_window_set_default_size (GTK_WINDOW (window), width, height); + gtk_container_add (GTK_CONTAINER (window), scrolled); gtk_container_add (GTK_CONTAINER (scrolled), web_view); g_signal_connect (window, "delete-event", -- 2.39.5