[sushi] mainwindow: don't allocate the padded area to the texture



commit 9304ed70f1cee356b77ef7a8a6dde0cf5441200e
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Wed May 11 00:53:17 2011 -0400

    mainwindow: don't allocate the padded area to the texture

 src/js/ui/mainWindow.js  |    6 +++---
 src/js/util/constants.js |    2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/js/ui/mainWindow.js b/src/js/ui/mainWindow.js
index 6926ccd..49b5e03 100644
--- a/src/js/ui/mainWindow.js
+++ b/src/js/ui/mainWindow.js
@@ -179,8 +179,8 @@ MainWindow.prototype = {
         let screenSize = [ this._gtkWindow.get_window().get_width(),
                            this._gtkWindow.get_window().get_height() ];
 
-        let availableWidth = this._isFullScreen ? screenSize[0] : Constants.VIEW_MAX_W;
-        let availableHeight = this._isFullScreen ? screenSize[1] : Constants.VIEW_MAX_H;
+        let availableWidth = this._isFullScreen ? screenSize[0] : Constants.VIEW_MAX_W - 2 * Constants.VIEW_PADDING_X;
+        let availableHeight = this._isFullScreen ? screenSize[1] : Constants.VIEW_MAX_H - Constants.VIEW_PADDING_Y;
 
         let textureSize = this._renderer.getSizeForAllocation([availableWidth, availableHeight], this._isFullScreen);
 
@@ -197,7 +197,7 @@ MainWindow.prototype = {
         }
 
         if (!this._isFullScreen) {
-            windowSize = [ windowSize[0] + Constants.VIEW_PADDING_X,
+            windowSize = [ windowSize[0] + 2 * Constants.VIEW_PADDING_X,
                            windowSize[1] + Constants.VIEW_PADDING_Y ];
         }
 
diff --git a/src/js/util/constants.js b/src/js/util/constants.js
index dcdd338..186b822 100644
--- a/src/js/util/constants.js
+++ b/src/js/util/constants.js
@@ -1,6 +1,6 @@
 let VIEW_MIN = 400;
 let VIEW_BACKGROUND_OPACITY = 220;
 let VIEW_PADDING_Y = 28;
-let VIEW_PADDING_X = 4;
+let VIEW_PADDING_X = 2;
 let VIEW_MAX_W = 800;
 let VIEW_MAX_H = 600;



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