appDisplay: Add some spacing in folder icons

With the switch to a table layout in commit f959cafb36, 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
This commit is contained in:
Florian Müllner 2014-03-14 17:03:10 +01:00
parent fe4fddf0d5
commit b222d0fe44
2 changed files with 4 additions and 5 deletions

View File

@ -979,6 +979,8 @@ StScrollBar StButton#vhandle:active {
.app-folder-icon {
padding: 5px;
spacing-rows: 5px;
spacing-columns: 5px;
}
.dash-item-container > StButton {

View File

@ -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));
}