[gnome-documents] main-window: set a minimum size request



commit 3246d1c1409ea765d9751e4321de7254ead50336
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Tue Dec 18 18:40:29 2012 +0100

    main-window: set a minimum size request
    
    We shouldn't allow shrinking the window size down arbitrarily, since
    the app becomes completely useless below a certain size.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=688788

 src/mainWindow.js |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/mainWindow.js b/src/mainWindow.js
index 84da48a..e3ff560 100644
--- a/src/mainWindow.js
+++ b/src/mainWindow.js
@@ -38,6 +38,8 @@ const WindowMode = imports.windowMode;
 const _ = imports.gettext.gettext;
 
 const _CONFIGURE_ID_TIMEOUT = 100; // msecs
+const _WINDOW_MIN_WIDTH = 600;
+const _WINDOW_MIN_HEIGHT = 500;
 
 const MainWindow = new Lang.Class({
     Name: 'MainWindow',
@@ -46,6 +48,8 @@ const MainWindow = new Lang.Class({
         this._configureId = 0;
 
         this.window = new Gtk.ApplicationWindow({ application: app,
+                                                  width_request: _WINDOW_MIN_WIDTH,
+                                                  height_request: _WINDOW_MIN_HEIGHT,
 						  window_position: Gtk.WindowPosition.CENTER,
                                                   hide_titlebar_when_maximized: true,
 						  title: _("Documents") });



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