[the-board] [ui] Set maximum window size to 1115x720



commit 875c18fc7e9ca8b009800b63f8bc3e2409e5fd31
Author: Lucas Rocha <lucasr gnome org>
Date:   Fri Nov 26 00:54:29 2010 +0000

    [ui] Set maximum window size to 1115x720
    
    Too large window sizes makes the app too slow. Some performance
    limitation on Clutter apps?

 src/js/ui/mainWindow.js |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/js/ui/mainWindow.js b/src/js/ui/mainWindow.js
index 5f63a88..2c0e901 100644
--- a/src/js/ui/mainWindow.js
+++ b/src/js/ui/mainWindow.js
@@ -455,8 +455,11 @@ MainWindow.prototype = {
     _updateWindowSize : function() {
         let screen = Gdk.Screen.get_default();
 
-        this._gtkWindow.defaultWidth = Math.round(screen.get_width() * 0.9);
-        this._gtkWindow.defaultHeight = Math.round(screen.get_height() * 0.9);
+        let newWidth = Math.round(screen.get_width() * 0.9);
+        let newHeight = Math.round(screen.get_height() * 0.9);
+
+        this._gtkWindow.defaultWidth = Math.min(1115, newWidth);
+        this._gtkWindow.defaultHeight = Math.min(720, newHeight);
     },
 
     _updateStartupBox : function() {



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