Bug 588445 - Use BigBox vertical alignment for the clock

panel.js: Replace the manual vertical padding calculation
    for the panel's clock with an y_align property on its
    BigBox container.
This commit is contained in:
Sander Dijkhuis 2009-07-13 14:44:54 +02:00
parent 10e30f7dc7
commit f7a82d6400

View File

@ -109,9 +109,7 @@ Panel.prototype = {
this._clock = new Clutter.Text({ font_name: "Sans Bold 16px", this._clock = new Clutter.Text({ font_name: "Sans Bold 16px",
text: "" }); text: "" });
let pad = (PANEL_HEIGHT - this._clock.height) / 2; let clockbox = new Big.Box({ y_align: Big.BoxAlignment.CENTER,
let clockbox = new Big.Box({ padding_top: pad,
padding_bottom: pad,
padding_left: 4, padding_left: 4,
padding_right: 4 }); padding_right: 4 });
clockbox.append(this._clock, Big.BoxPackFlags.NONE); clockbox.append(this._clock, Big.BoxPackFlags.NONE);