1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
|
using Gtk 4.0;
using Adw 1;
using Gio 2.0;
template $PpsSidebarThumbnails: $PpsSidebarPage {
notify::scale-factor => $reload() swapped;
child: Box {
orientation: vertical;
ScrolledWindow {
valign: fill;
vexpand: true;
hscrollbar-policy: never;
vscrollbar-policy: automatic;
child: Adw.ClampScrollable clamp {
vscroll-policy: natural;
maximum-size: 240;
tightening-threshold: 180;
child: GridView grid_view {
max-columns: 1;
min-columns: 1;
halign: center;
tab-behavior: item;
factory: SignalListItemFactory factory {
setup => $grid_view_factory_setup() swapped;
bind => $grid_view_factory_bind() swapped;
unbind => $grid_view_factory_unbind() swapped;
};
model: SingleSelection selection_model {
autoselect: false;
model: Gio.ListStore list_store {};
selection-changed => $grid_view_selection_changed() swapped;
};
styles [
"navigation-sidebar",
]
accessibility {
label: _("Previews");
}
};
};
}
};
}
|