appDisplay: Use Clutter.GridLayout

Clutter.TableLayout has been deprecated, so move to the recommended
replacement.
This commit is contained in:
Florian Müllner 2014-08-05 23:26:45 +02:00
parent b90cc5ff26
commit fe60db64e0

View File

@ -964,7 +964,7 @@ const FolderView = new Lang.Class({
}, },
createFolderIcon: function(size) { createFolderIcon: function(size) {
let layout = new Clutter.TableLayout(); let layout = new Clutter.GridLayout();
let icon = new St.Widget({ layout_manager: layout, let icon = new St.Widget({ layout_manager: layout,
style_class: 'app-folder-icon' }); style_class: 'app-folder-icon' });
layout.hookup_style(icon); layout.hookup_style(icon);
@ -980,7 +980,7 @@ const FolderView = new Lang.Class({
} else { } else {
bin = new St.Bin({ width: subSize, height: subSize }); bin = new St.Bin({ width: subSize, height: subSize });
} }
layout.pack(bin, rtl ? (i + 1) % 2 : i % 2, Math.floor(i / 2)); layout.attach(bin, rtl ? (i + 1) % 2 : i % 2, Math.floor(i / 2), 1, 1);
} }
return icon; return icon;