[gnome-shell/gbsneto/center-folders] folderView: Center folder icon



commit 99d0f8f3a05c079bf74ad884805b8e0fee8a8537
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Mon Nov 11 18:07:19 2019 -0300

    folderView: Center folder icon
    
    The FolderView class is responsible for creating the 4-item
    grid of the folder icon, with the preview of the first four
    apps inside the folder.
    
    However, with the deprecation of StAlign as child properties,
    the folder icon stopped being horizontally centralized.
    
    Center the folder icon horizontally again.
    
    https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/817

 js/ui/appDisplay.js | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index 98bd5ec968..ceedec4a1a 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -1305,8 +1305,12 @@ class FolderView extends BaseAppView {
 
     createFolderIcon(size) {
         let layout = new Clutter.GridLayout();
-        let icon = new St.Widget({ layout_manager: layout,
-                                   style_class: 'app-folder-icon' });
+        let icon = new St.Widget({
+            layout_manager: layout,
+            style_class: 'app-folder-icon',
+            x_align: Clutter.ActorAlign.CENTER,
+            y_align: Clutter.ActorAlign.CENTER,
+        });
         layout.hookup_style(icon);
         let subSize = Math.floor(FOLDER_SUBICON_FRACTION * size);
         let scale = St.ThemeContext.get_for_stage(global.stage).scale_factor;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]