[the-board] [ui] Allow setting initial visible state for ToolBoxGroup
- From: Lucas Almeida Rocha <lucasr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [the-board] [ui] Allow setting initial visible state for ToolBoxGroup
- Date: Sun, 7 Nov 2010 23:20:44 +0000 (UTC)
commit fe1bba29090d13558cc41056a6514189a0f0c1f3
Author: Lucas Rocha <lucasr gnome org>
Date: Sun Nov 7 19:46:32 2010 +0000
[ui] Allow setting initial visible state for ToolBoxGroup
src/js/ui/toolBoxGroup.js | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/js/ui/toolBoxGroup.js b/src/js/ui/toolBoxGroup.js
index 212faef..10f8d3d 100644
--- a/src/js/ui/toolBoxGroup.js
+++ b/src/js/ui/toolBoxGroup.js
@@ -31,11 +31,15 @@ ToolBoxGroup.prototype = {
_init : function(args) {
args = args || {};
+ if ('visible' in args) {
+ this._visible = args.visible;
+ } else {
+ this._visible = true;
+ }
+
this._activeToolBox = null;
this._toolBoxes = [];
- this._visible = true;
-
this._createMainBox();
this._createContentBox();
},
@@ -45,6 +49,7 @@ ToolBoxGroup.prototype = {
new Tb.Box({ orientation: Tb.BoxOrientation.HORIZONTAL,
xAlign: Tb.BoxAlignment.FILL,
yAlign: Tb.BoxAlignment.FILL,
+ anchorY: this._visible ? 0 : _TOOLBOX_ANCHOR_Y,
name: "tool-box-group-main-box" });
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]