[gnome-shell] panel: Fix a copy/paste type when dealing with panel corners
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] panel: Fix a copy/paste type when dealing with panel corners
- Date: Fri, 12 Oct 2012 21:50:09 +0000 (UTC)
commit 88fbdba018f310b9902a1b23b15ae7ab6fea7b7e
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Fri Oct 12 13:51:48 2012 -0400
panel: Fix a copy/paste type when dealing with panel corners
Since panel corners are currently square, this doesn't really affect much,
but it's very clear what the code was supposed to be. At the same time,
also fix up a redeclaration with 'let', which technically isnt' kosher.
js/ui/panel.js | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/js/ui/panel.js b/js/ui/panel.js
index bcbaafb..adb23f2 100644
--- a/js/ui/panel.js
+++ b/js/ui/panel.js
@@ -1026,16 +1026,19 @@ const Panel = new Lang.Class({
}
this._rightBox.allocate(childBox, flags);
- let [cornerMinWidth, cornerWidth] = this._leftCorner.actor.get_preferred_width(-1);
- let [cornerMinHeight, cornerHeight] = this._leftCorner.actor.get_preferred_width(-1);
+ let cornerMinWidth, cornerMinHeight;
+ let cornerWidth, cornerHeight;
+
+ [cornerMinWidth, cornerWidth] = this._leftCorner.actor.get_preferred_width(-1);
+ [cornerMinHeight, cornerHeight] = this._leftCorner.actor.get_preferred_height(-1);
childBox.x1 = 0;
childBox.x2 = cornerWidth;
childBox.y1 = allocHeight;
childBox.y2 = allocHeight + cornerHeight;
this._leftCorner.actor.allocate(childBox, flags);
- let [cornerMinWidth, cornerWidth] = this._rightCorner.actor.get_preferred_width(-1);
- let [cornerMinHeight, cornerHeight] = this._rightCorner.actor.get_preferred_width(-1);
+ [cornerMinWidth, cornerWidth] = this._rightCorner.actor.get_preferred_width(-1);
+ [cornerMinHeight, cornerHeight] = this._rightCorner.actor.get_preferred_height(-1);
childBox.x1 = allocWidth - cornerWidth;
childBox.x2 = allocWidth;
childBox.y1 = allocHeight;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]