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:
parent
fe4fddf0d5
commit
b222d0fe44
@ -979,6 +979,8 @@ StScrollBar StButton#vhandle:active {
|
|||||||
|
|
||||||
.app-folder-icon {
|
.app-folder-icon {
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
|
spacing-rows: 5px;
|
||||||
|
spacing-columns: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dash-item-container > StButton {
|
.dash-item-container > StButton {
|
||||||
|
@ -933,15 +933,12 @@ const FolderView = new Lang.Class({
|
|||||||
let layout = new Clutter.TableLayout();
|
let layout = new Clutter.TableLayout();
|
||||||
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);
|
||||||
let subSize = Math.floor(FOLDER_SUBICON_FRACTION * size);
|
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++) {
|
for (let i = 0; i < Math.min(this._allItems.length, 4); i++) {
|
||||||
let texture = this._allItems[i].app.create_icon_texture(subSize);
|
let texture = this._allItems[i].app.create_icon_texture(subSize);
|
||||||
let bin = new St.Bin({ child: texture,
|
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)]);
|
|
||||||
layout.pack(bin, i % 2, Math.floor(i / 2));
|
layout.pack(bin, i % 2, Math.floor(i / 2));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user