|
|
@ -62,7 +62,8 @@ const WeatherUnits = { |
|
|
|
} |
|
|
|
} |
|
|
|
const WeatherPosition = { |
|
|
|
const WeatherPosition = { |
|
|
|
CENTER: 0, |
|
|
|
CENTER: 0, |
|
|
|
RIGHT: 1 |
|
|
|
RIGHT: 1, |
|
|
|
|
|
|
|
LEFT: 2 |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function WeatherMenuButton() { |
|
|
|
function WeatherMenuButton() { |
|
|
@ -138,12 +139,17 @@ WeatherMenuButton.prototype = { |
|
|
|
topBox.add_actor(this._weatherInfo); |
|
|
|
topBox.add_actor(this._weatherInfo); |
|
|
|
this.actor.set_child(topBox); |
|
|
|
this.actor.set_child(topBox); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let children = null; |
|
|
|
switch (this._position_in_panel) { |
|
|
|
switch (this._position_in_panel) { |
|
|
|
|
|
|
|
case WeatherPosition.LEFT: |
|
|
|
|
|
|
|
children = Main.panel._leftBox.get_children(); |
|
|
|
|
|
|
|
Main.panel._leftBox.insert_actor (this.actor, children.length-1); |
|
|
|
|
|
|
|
break; |
|
|
|
case WeatherPosition.CENTER: |
|
|
|
case WeatherPosition.CENTER: |
|
|
|
Main.panel._centerBox.add(this.actor, { y_fill: true }); |
|
|
|
Main.panel._centerBox.add(this.actor, { y_fill: true }); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case WeatherPosition.RIGHT: |
|
|
|
case WeatherPosition.RIGHT: |
|
|
|
let children = Main.panel._rightBox.get_children(); |
|
|
|
children = Main.panel._rightBox.get_children(); |
|
|
|
Main.panel._rightBox.insert_actor(this.actor, children.length-1); |
|
|
|
Main.panel._rightBox.insert_actor(this.actor, children.length-1); |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|