[gnome-shell/gbsneto/icon-grid-part0: 1/2] baseIcon: Align labels to the center
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/gbsneto/icon-grid-part0: 1/2] baseIcon: Align labels to the center
- Date: Wed, 24 Jul 2019 21:56:25 +0000 (UTC)
commit c0e90807e0e80b7607be4eba7ad528f77ab37436
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Wed Jul 3 13:27:21 2019 -0300
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
js/ui/iconGrid.js | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/js/ui/iconGrid.js b/js/ui/iconGrid.js
index d5f600513d..c74ff4361a 100644
--- a/js/ui/iconGrid.js
+++ b/js/ui/iconGrid.js
@@ -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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]