mirror of
https://github.com/storytold/lightcraft.git
synced 2026-10-15 03:36:57 -04:00
KEY-ZOOM: Cmd+= / Cmd+- / Cmd+0 zoom the photo, not egui's interface scale (#566)
egui's zoom_with_keyboard was left on, so at the end of every frame it took the same keys as View ▸ Zoom In / Zoom Out / Zoom to Fit for its browser-style interface zoom. On macOS the native menu bar got the keys first; on Windows and Linux the whole UI scaled. theme::apply turns the option off for every context (desktop, headless, tests). Headless tests that pressed Cmd+Plus / Cmd+Minus to exercise the interface zoom's viewport handling set the zoom factor directly; the CLI snapshot test that did the same is dropped (the unit tests cover the mechanism). New tests_zoom_keys.rs: the shortcuts step the photo zoom while the zoom factor stays, and Ctrl+wheel over the photo zooms it in the Edit view.
This commit is contained in:
1 parent
88ea1a804b
commit
a677478b92
7 files changed
+108
-40
No files matched your search
@@ -100,7 +100,8 @@ Headless screenshot dimensions must be finite and at least one logical point, wi
|
||||
positive scale. Rounded output must be at least one pixel per edge, at most 16,384 pixels
|
||||
per edge and 64 million pixels in total. `snapshot` and `ui.resize` reject requests outside
|
||||
these limits before layout or rasterization; supplied resize dimensions must be numbers.
|
||||
UI zoom changes text and control sizes while preserving the snapshot viewport's requested
|
||||
An interface zoom (egui's zoom factor; the keyboard never changes it — ⌘= / ⌘− / ⌘0 zoom the
|
||||
photo, issue #566) changes text and control sizes while preserving the snapshot viewport's requested
|
||||
physical pixel dimensions. Later `ui.resize` requests use current egui points; validation
|
||||
and rasterization both convert them to native viewport points before rounding the output
|
||||
pixels. A native edge below one point after zooming out is valid if it rounds to at least
|
||||
|
||||
Reference in new issue
Block a user