From b222d0fe447d6a955a9414a3e505345e6508ba39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Fri, 14 Mar 2014 17:03:10 +0100 Subject: [PATCH] appDisplay: Add some spacing in folder icons With the switch to a table layout in commit f959cafb36a43e, setting alignments to place the individual icons at the outer edge of the grid stopped working. Remove that code and add some explicit spacing instead. https://bugzilla.gnome.org/show_bug.cgi?id=726323 --- data/theme/gnome-shell.css | 2 ++ js/ui/appDisplay.js | 7 ++----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/data/theme/gnome-shell.css b/data/theme/gnome-shell.css index ac33643eb..4fb4be13c 100644 --- a/data/theme/gnome-shell.css +++ b/data/theme/gnome-shell.css @@ -979,6 +979,8 @@ StScrollBar StButton#vhandle:active { .app-folder-icon { padding: 5px; + spacing-rows: 5px; + spacing-columns: 5px; } .dash-item-container > StButton { diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js index f29a874cf..d9947b5b0 100644 --- a/js/ui/appDisplay.js +++ b/js/ui/appDisplay.js @@ -933,15 +933,12 @@ const FolderView = new Lang.Class({ let layout = new Clutter.TableLayout(); let icon = new St.Widget({ layout_manager: layout, style_class: 'app-folder-icon' }); + layout.hookup_style(icon); let subSize = Math.floor(FOLDER_SUBICON_FRACTION * size); - let aligns = [ Clutter.ActorAlign.START, Clutter.ActorAlign.END ]; for (let i = 0; i < Math.min(this._allItems.length, 4); i++) { let texture = this._allItems[i].app.create_icon_texture(subSize); - let bin = new St.Bin({ child: texture, - x_expand: true, y_expand: true }); - bin.set_x_align(aligns[i % 2]); - bin.set_y_align(aligns[Math.floor(i / 2)]); + let bin = new St.Bin({ child: texture }); layout.pack(bin, i % 2, Math.floor(i / 2)); }