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
This commit is contained in:
parent
61210fdae1
commit
913990b9ea
@ -1305,8 +1305,11 @@ class FolderView extends BaseAppView {
|
|||||||
|
|
||||||
createFolderIcon(size) {
|
createFolderIcon(size) {
|
||||||
let layout = new Clutter.GridLayout();
|
let layout = new Clutter.GridLayout();
|
||||||
let icon = new St.Widget({ layout_manager: layout,
|
let icon = new St.Widget({
|
||||||
style_class: 'app-folder-icon' });
|
layout_manager: layout,
|
||||||
|
style_class: 'app-folder-icon',
|
||||||
|
x_align: Clutter.ActorAlign.CENTER,
|
||||||
|
});
|
||||||
layout.hookup_style(icon);
|
layout.hookup_style(icon);
|
||||||
let subSize = Math.floor(FOLDER_SUBICON_FRACTION * size);
|
let subSize = Math.floor(FOLDER_SUBICON_FRACTION * size);
|
||||||
let scale = St.ThemeContext.get_for_stage(global.stage).scale_factor;
|
let scale = St.ThemeContext.get_for_stage(global.stage).scale_factor;
|
||||||
|
Loading…
Reference in New Issue
Block a user