mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-18 07:34:54 +00:00
baseIcon: Align labels to the center
Ensure icon labels are aligned to the center, both vertically and horizontally. This will be required for using BaseIcons as drag actors. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/643
This commit is contained in:
parent
3db1058c2c
commit
c0e90807e0
1 changed files with 4 additions and 0 deletions
|
|
@ -57,6 +57,10 @@ class BaseIcon extends St.Bin {
|
|||
|
||||
if (params.showLabel) {
|
||||
this.label = new St.Label({ text: label });
|
||||
this.label.clutter_text.set({
|
||||
x_align: Clutter.ActorAlign.CENTER,
|
||||
y_align: Clutter.ActorAlign.CENTER
|
||||
});
|
||||
this._box.add_actor(this.label);
|
||||
} else {
|
||||
this.label = null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue