[the-board: 6/10] [ui] Rename _LAYER_TOOLBOX to _LAYER_TOOLBAR
- From: Lucas Rocha <lucasr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [the-board: 6/10] [ui] Rename _LAYER_TOOLBOX to _LAYER_TOOLBAR
- Date: Tue, 25 Jan 2011 22:40:16 +0000 (UTC)
commit 79dfc340d8a6a2b6627486fce780b1d7ce0696f6
Author: Lucas Rocha <lucasr gnome org>
Date: Tue Jan 25 22:06:13 2011 +0000
[ui] Rename _LAYER_TOOLBOX to _LAYER_TOOLBAR
To match the actual semantics of the constant.
src/js/ui/mainWindow.js | 8 ++++----
src/js/ui/page.js | 14 +++++++-------
2 files changed, 11 insertions(+), 11 deletions(-)
---
diff --git a/src/js/ui/mainWindow.js b/src/js/ui/mainWindow.js
index 2475d52..5066f50 100644
--- a/src/js/ui/mainWindow.js
+++ b/src/js/ui/mainWindow.js
@@ -27,7 +27,7 @@ const ToolBoxThings = imports.ui.toolBoxThings;
const PageManager = imports.model.pageManager;
const _LAYER_PAGE = 0.1;
-const _LAYER_TOOLBOX = 0.2;
+const _LAYER_TOOLBAR = 0.2;
const _SHOW_SPINNER_TIME = 0.5;
const _HIDE_SPINNER_TIME = 0.5;
@@ -209,7 +209,7 @@ MainWindow.prototype = {
_createMainToolbar : function() {
this._mainToolbar = new Toolbar.Toolbar();
- this._mainToolbar.actor.depth = _LAYER_TOOLBOX;
+ this._mainToolbar.actor.depth = _LAYER_TOOLBAR;
this._createToolBoxPages();
this._createToolBoxThings();
@@ -230,7 +230,7 @@ MainWindow.prototype = {
new Toolbar.Toolbar({ title: Gettext.gettext("Selection"),
visible: false });
- this._selectionToolbar.actor.depth = _LAYER_TOOLBOX;
+ this._selectionToolbar.actor.depth = _LAYER_TOOLBAR;
this._createToolBoxAlign();
this._createToolBoxDistribute();
@@ -482,7 +482,7 @@ MainWindow.prototype = {
{ mainWindow: this });
if (thingToolbar) {
- thingToolbar.actor.depth = _LAYER_TOOLBOX;
+ thingToolbar.actor.depth = _LAYER_TOOLBAR;
this._toolbarsByThingId[thingId] = thingToolbar;
diff --git a/src/js/ui/page.js b/src/js/ui/page.js
index 68e121f..6d68dd2 100644
--- a/src/js/ui/page.js
+++ b/src/js/ui/page.js
@@ -580,7 +580,7 @@ Page.prototype = {
let moveThing = function(thing) {
let area = thing.area;
- let x, y;
+ let x, y, thingCenter;
switch(orientation) {
case Orientation.VERTICAL:
@@ -593,13 +593,13 @@ Page.prototype = {
}
let width = area.x2 - area.x1;
- let verticalCenter = area.x1 + (width / 2);
+ thingCenter = area.x1 + (width / 2);
if (centerCoord < 0) {
- centerCoord = verticalCenter;
+ centerCoord = thingCenter;
}
- x = area.x1 + (centerCoord - verticalCenter);
+ x = area.x1 + (centerCoord - thingCenter);
y = currentCoord;
currentCoord += area.y2 - area.y1 +
@@ -617,14 +617,14 @@ Page.prototype = {
}
let height = area.y2 - area.y1;
- let horizontalCenter = area.y1 + (height / 2);
+ thingCenter = area.y1 + (height / 2);
if (centerCoord < 0) {
- centerCoord = horizontalCenter;
+ centerCoord = thingCenter;
}
x = currentCoord;
- y = area.y1 + (centerCoord - horizontalCenter);
+ y = area.y1 + (centerCoord - thingCenter);
currentCoord += area.x2 - area.x1 +
_DISTRIBUTE_HORIZONTAL_SPACING;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]