appDisplay: don't force size on folder icon actor

Use a table layout instead.

https://bugzilla.gnome.org/show_bug.cgi?id=705410
This commit is contained in:
Cosimo Cecchi 2014-02-15 22:06:53 -08:00
parent e92d204d42
commit f959cafb36

View File

@ -924,9 +924,9 @@ const FolderView = new Lang.Class({
}, },
createFolderIcon: function(size) { createFolderIcon: function(size) {
let icon = new St.Widget({ layout_manager: new Clutter.BinLayout(), let layout = new Clutter.TableLayout();
style_class: 'app-folder-icon', let icon = new St.Widget({ layout_manager: layout,
width: size, height: size }); style_class: 'app-folder-icon' });
let subSize = Math.floor(FOLDER_SUBICON_FRACTION * size); let subSize = Math.floor(FOLDER_SUBICON_FRACTION * size);
let aligns = [ Clutter.ActorAlign.START, Clutter.ActorAlign.END ]; let aligns = [ Clutter.ActorAlign.START, Clutter.ActorAlign.END ];
@ -936,7 +936,7 @@ const FolderView = new Lang.Class({
x_expand: true, y_expand: true }); x_expand: true, y_expand: true });
bin.set_x_align(aligns[i % 2]); bin.set_x_align(aligns[i % 2]);
bin.set_y_align(aligns[Math.floor(i / 2)]); bin.set_y_align(aligns[Math.floor(i / 2)]);
icon.add_actor(bin); layout.pack(bin, i % 2, Math.floor(i / 2));
} }
return icon; return icon;