mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-26 02:09:00 +00:00
Size organize tiles for the page grid
This commit is contained in:
@@ -456,7 +456,7 @@ impl<'a> PageThumbnails<'a> {
|
||||
let tail: Vec<TailRow<usize>> = if new_page_row { vec![TailRow::new(new_page, words.new_page.clone())] } else { Vec::new() };
|
||||
// Organize uses a portrait page frame for every page, so landscape pages fit inside it
|
||||
// instead of collapsing the room reserved for the controls around the picture.
|
||||
let aspect = if organize { 0.75 } else if count == 0 { 1.0 } else { aspect_of(source, 0) };
|
||||
let aspect = if organize { 0.85 } else if count == 0 { 1.0 } else { aspect_of(source, 0) };
|
||||
let mut grid = TileGrid::<usize>::new(label)
|
||||
.id_source(id)
|
||||
.selection(Bind::bound(&mut *picked))
|
||||
|
||||
@@ -152,8 +152,8 @@ impl AroundPicture {
|
||||
let sizes = Sizes::of(cx, card, place);
|
||||
let mut around = sizes.around(place, detail);
|
||||
if action_place == TileActionPlace::Band {
|
||||
around.start = sizes.bar + sizes.column(place);
|
||||
around.end = sizes.bar;
|
||||
around.start = sizes.glyph + sizes.column(place);
|
||||
around.end = sizes.glyph;
|
||||
around.top += sizes.bar;
|
||||
around.bottom += sizes.bar;
|
||||
}
|
||||
@@ -787,8 +787,8 @@ impl Component for Tile<'_> {
|
||||
TileStyle {
|
||||
surface,
|
||||
metrics: Metrics::new().padding(Insets::new(
|
||||
if key.action_place == TileActionPlace::Band { sizes.bar } else { sizes.inset },
|
||||
if key.action_place == TileActionPlace::Band { sizes.bar } else { sizes.inset },
|
||||
if key.action_place == TileActionPlace::Band { sizes.glyph } else { sizes.inset },
|
||||
if key.action_place == TileActionPlace::Band { sizes.glyph } else { sizes.inset },
|
||||
sizes.inset,
|
||||
sizes.inset,
|
||||
)).gap(sizes.tight),
|
||||
|
||||
Reference in New Issue
Block a user