[gnome-shell/gbsneto/icon-grid-dnd: 5/9] baseIcon: Align labels to the center



commit c019b1af2738667120155d407b03a322d140e25b
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/603

 js/ui/iconGrid.js | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/js/ui/iconGrid.js b/js/ui/iconGrid.js
index 60ef8b573..699838bd7 100644
--- a/js/ui/iconGrid.js
+++ b/js/ui/iconGrid.js
@@ -75,6 +75,8 @@ class BaseIcon extends St.Bin {
 
         if (params.showLabel) {
             this.label = new St.Label({ text: label });
+            this.label.clutter_text.x_align = Clutter.ActorAlign.CENTER;
+            this.label.clutter_text.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]