[the-board] [style] Sanitize paddings and spacing in toolbars and toolboxes



commit 9040031bc895e02652a6759288e4afe8da92ef79
Author: Lucas Rocha <lucasr gnome org>
Date:   Sun Jan 23 22:41:49 2011 +0000

    [style] Sanitize paddings and spacing in toolbars and toolboxes
    
    Get rid of thing-specific toolbox style, apply standard spacing
    everywhere, remove redudant background color properties, etc.

 data/style/style.css      |   19 +++++++++----------
 src/js/ui/things/photo.js |    3 +--
 src/js/ui/things/sound.js |    3 +--
 src/js/ui/things/text.js  |    3 +--
 src/js/ui/things/video.js |    3 +--
 src/js/ui/toolBox.js      |   14 +-------------
 src/js/ui/toolBoxPages.js |    6 +++---
 7 files changed, 17 insertions(+), 34 deletions(-)
---
diff --git a/data/style/style.css b/data/style/style.css
index 0d0b868..4445604 100644
--- a/data/style/style.css
+++ b/data/style/style.css
@@ -137,7 +137,7 @@ TbBox#toolbar-main-box {
 
 TbBox#toolbar-content-box {
     background-color: white;
-    spacing: 35px;
+    spacing: 20px;
 }
 
 TbBox#toolbar-title-box {
@@ -153,8 +153,8 @@ MxLabel#toolbar-title-label {
 /* ToolBox */ 
 
 TbBox#tool-box-main-box {
-    background-color: white;
-    padding: 0px;
+    padding: 0px 12px 0px 12px;
+    spacing: 12px;
 }
 
 TbBox#tool-box-title-box {
@@ -162,7 +162,7 @@ TbBox#tool-box-title-box {
 }
 
 TbBox#tool-box-button-box {
-    padding: 12px 12px 7px 12px;
+    padding: 12px 0px 7px 0px;
     spacing: 10px;
 }
 
@@ -171,11 +171,6 @@ MxLabel#tool-box-title-label {
     font-size: 14px;
 }
 
-TbBox#thing-tool-box-main-box {
-    background-color: white;
-    padding: 0px 0px 0px 12px;
-}
-
 MxButton#tool-box-button {
     font-size: 14px;
     color: black;
@@ -191,6 +186,11 @@ MxButton#tool-box-button:hover {
     border-image: url("tool-box-button-selected.png") 4 4 4 4;
 }
 
+TbBox#tool-box-pages-main-box {
+    background-color: yellow;
+    padding: 0px;
+}
+
 TbBox#tool-box-pages-button-box-editing,
 TbBox#tool-box-pages-button-box:hover {
     background-color: #FFFF99;
@@ -199,7 +199,6 @@ TbBox#tool-box-pages-button-box:hover {
 TbBox#tool-box-pages-button-box,
 TbBox#tool-box-pages-button-box-editing {
     padding: 0 0 0 4;
-    background-color: white;
     spacing: 4px;
 }
 
diff --git a/src/js/ui/things/photo.js b/src/js/ui/things/photo.js
index e75d884..f1e7f46 100644
--- a/src/js/ui/things/photo.js
+++ b/src/js/ui/things/photo.js
@@ -405,8 +405,7 @@ function createToolbar(args) {
                               visible: false });
 
     let toolBox =
-        new ToolBox.ToolBox({ title: Gettext.gettext("Load from"),
-                              isThingToolBox: true });
+        new ToolBox.ToolBox({ title: Gettext.gettext("Load from") });
 
     toolBox.addButton({ label: Gettext.gettext("File"),
                         actionName: "chooseFile" });
diff --git a/src/js/ui/things/sound.js b/src/js/ui/things/sound.js
index 752d1a6..6239252 100644
--- a/src/js/ui/things/sound.js
+++ b/src/js/ui/things/sound.js
@@ -679,8 +679,7 @@ function createToolbar(args) {
                               visible: false });
 
     let toolBox =
-        new ToolBox.ToolBox({ title: Gettext.gettext("Load from"),
-                              isThingToolBox: true });
+        new ToolBox.ToolBox({ title: Gettext.gettext("Load from") });
 
     toolBox.addButton({ label: Gettext.gettext("File"),
                         actionName: "chooseFile" });
diff --git a/src/js/ui/things/text.js b/src/js/ui/things/text.js
index c6d6eff..d817807 100644
--- a/src/js/ui/things/text.js
+++ b/src/js/ui/things/text.js
@@ -389,8 +389,7 @@ TextToolbar.prototype = {
     _createFontSizeToolBox : function() {
         this._fontSizeToolBox =
             new ToolBox.ToolBox({ title: Gettext.gettext("Font Size"),
-                                  isButtonGroup: true,
-                                  isThingToolBox: true });
+                                  isButtonGroup: true });
 
         this._fontSizeButtons = {};
 
diff --git a/src/js/ui/things/video.js b/src/js/ui/things/video.js
index d06c3f2..37338b6 100644
--- a/src/js/ui/things/video.js
+++ b/src/js/ui/things/video.js
@@ -650,8 +650,7 @@ function createToolbar(args) {
                               visible: false });
 
     let toolBox =
-        new ToolBox.ToolBox({ title: Gettext.gettext("Load from"),
-                              isThingToolBox: true });
+        new ToolBox.ToolBox({ title: Gettext.gettext("Load from") });
 
     toolBox.addButton({ label: Gettext.gettext("File"),
                         actionName: "chooseFile" });
diff --git a/src/js/ui/toolBox.js b/src/js/ui/toolBox.js
index 50a6967..e2a1eeb 100644
--- a/src/js/ui/toolBox.js
+++ b/src/js/ui/toolBox.js
@@ -28,18 +28,6 @@ ToolBox.prototype = {
             this._isButtonGroup = false;
         }
 
-        if ('isThingToolBox' in args) {
-            this._isThingToolBox = args.isThingToolBox;
-        } else {
-            this._isThingToolBox = false;
-        }
-
-        if (this._isThingToolBox) {
-            this._mainBoxName = "thing-tool-box-main-box";
-        } else {
-            this._mainBoxName = "tool-box-main-box";
-        }
-
         this._loaded = false;
         this._active = false;
         this._buttons = [];
@@ -59,7 +47,7 @@ ToolBox.prototype = {
                          xAlign: Tb.BoxAlignment.START,
                          yAlign: Tb.BoxAlignment.FILL,
                          reactive: true,
-                         name: this._mainBoxName });
+                         name: "tool-box-main-box" });
     },
 
     _createTitleBox : function() {
diff --git a/src/js/ui/toolBoxPages.js b/src/js/ui/toolBoxPages.js
index 57a2638..e77b711 100644
--- a/src/js/ui/toolBoxPages.js
+++ b/src/js/ui/toolBoxPages.js
@@ -62,7 +62,7 @@ ToolBoxPages.prototype = {
                          xAlign: Tb.BoxAlignment.FILL,
                          yAlign: Tb.BoxAlignment.FILL,
                          width: _WIDTH,
-                         name: "tool-box-main-box" });
+                         name: "tool-box-pages-main-box" });
     },
 
     _createButtonBox : function() {
@@ -144,8 +144,8 @@ ToolBoxPages.prototype = {
 
         this._coverBox =
             new Tb.Box({ orientation: Tb.BoxOrientation.VERTICAL,
-                         width: _WIDTH + 16,
-                         anchorX: -8,
+                         width: _WIDTH,
+                         anchorX: 2,
                          name: "tool-box-pages-cover-box" });
 
         this._buttonBox.append(this._coverBox,



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