Graphic Styles: 40-point tiles in Thumbnail View

Thumbnail View sets its own zoom, as the list views do, so its tiles are
production's 40 points and no longer keep a list view's zoom.
This commit is contained in:
bflatastic committed 2026-11-25 15:21:43 +07:00
1 parent a740991ef4
commit df940cff4e
1 file changed
+7 -8
+7 -8
View File
@@ -78,12 +78,13 @@ impl View {
} }
} }
/// The thumbnail zoom that makes the browser's list rows small or large; `None` keeps the grid's own. /// The thumbnail zoom of this view: the grid's tiles about 40 points, as production's, and the list rows small or
fn list_zoom(self) -> Option<f64> { /// large.
fn zoom(self) -> f64 {
match self { match self {
View::Thumbnail => None, View::Thumbnail => 5.0 / 6.0,
View::SmallList => Some(0.5), View::SmallList => 0.5,
View::LargeList => Some(2.0), View::LargeList => 2.0,
} }
} }
} }
@@ -468,9 +469,7 @@ pub fn show(app: &mut VectorcraftApp, ui: &mut Ui) {
let mut panel = std::mem::take(&mut app.ui.graphic_styles_panel); let mut panel = std::mem::take(&mut app.ui.graphic_styles_panel);
let looks = look_hashes(&mut panel, app); let looks = look_hashes(&mut panel, app);
let view = app.ui.graphic_styles_view; let view = app.ui.graphic_styles_view;
if let Some(zoom) = view.list_zoom() { panel.state.zoom = view.zoom();
panel.state.zoom = zoom;
}
let before = panel.selection.clone(); let before = panel.selection.clone();
let (alt, linked) = (alt_held(ui), app.session.selection_graphic_style().is_some()); let (alt, linked) = (alt_held(ui), app.session.selection_graphic_style().is_some());
let thumbs = style_thumbs(app, &doc, &looks, panel.preview); let thumbs = style_thumbs(app, &doc, &looks, panel.preview);