PowerMenu: increase padding to the left of the percentage
This avoids having the percentage and device label in close succession. https://bugzilla.gnome.org/show_bug.cgi?id=689297
This commit is contained in:
parent
73ae451cb4
commit
65723bcac5
@ -252,6 +252,10 @@ StScrollBar StButton#vhandle:active {
|
|||||||
icon-size: 1.09em;
|
icon-size: 1.09em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.popup-battery-percentage {
|
||||||
|
padding-left: 24px;
|
||||||
|
}
|
||||||
|
|
||||||
/* Switches */
|
/* Switches */
|
||||||
.toggle-switch {
|
.toggle-switch {
|
||||||
width: 65px;
|
width: 65px;
|
||||||
|
@ -61,7 +61,7 @@ const Indicator = new Lang.Class({
|
|||||||
this._primaryDeviceId = null;
|
this._primaryDeviceId = null;
|
||||||
|
|
||||||
this._batteryItem = new PopupMenu.PopupMenuItem('', { reactive: false });
|
this._batteryItem = new PopupMenu.PopupMenuItem('', { reactive: false });
|
||||||
this._primaryPercentage = new St.Label();
|
this._primaryPercentage = new St.Label({ style_class: 'popup-battery-percentage' });
|
||||||
this._batteryItem.addActor(this._primaryPercentage, { align: St.Align.END });
|
this._batteryItem.addActor(this._primaryPercentage, { align: St.Align.END });
|
||||||
this.menu.addMenuItem(this._batteryItem);
|
this.menu.addMenuItem(this._batteryItem);
|
||||||
|
|
||||||
@ -183,7 +183,8 @@ const DeviceItem = new Lang.Class({
|
|||||||
this._box.add_actor(this._label);
|
this._box.add_actor(this._label);
|
||||||
this.addActor(this._box);
|
this.addActor(this._box);
|
||||||
|
|
||||||
let percentLabel = new St.Label({ text: C_("percent of battery remaining", "%d%%").format(Math.round(percentage)) });
|
let percentLabel = new St.Label({ text: C_("percent of battery remaining", "%d%%").format(Math.round(percentage)),
|
||||||
|
style_class: 'popup-battery-percentage' });
|
||||||
this.addActor(percentLabel, { align: St.Align.END });
|
this.addActor(percentLabel, { align: St.Align.END });
|
||||||
//FIXME: ideally we would like to expose this._label and percentLabel
|
//FIXME: ideally we would like to expose this._label and percentLabel
|
||||||
this.actor.label_actor = percentLabel;
|
this.actor.label_actor = percentLabel;
|
||||||
|
Loading…
Reference in New Issue
Block a user