Merge pull request #916 from pravdomil/claude/composition-maximize-zoom-fit-86627e

Viewer: Fit up to 100% follows the panel size

# Conflicts:
#	crates/ui-egui/src/panels/viewer_tools.rs
#	crates/ui-egui/tests/ui_viewer.rs
This commit is contained in:
Brandon Thomas
2026-10-12 04:22:53 -04:00
6 changed files with 68 additions and 14 deletions
+3
View File
@@ -233,6 +233,8 @@ pub use effectcraft_engine::project::Resolution;
pub struct ViewerState {
/// Magnification (1 = 100%); None = fit.
pub zoom: Option<f32>,
/// Fit up to 100%: while fitting (`zoom` is None), the comp is never magnified past 100%.
pub fit_up_to_100: bool,
/// Pan offset in points from the centred position.
pub pan: [f32; 2],
pub transparency_grid: bool,
@@ -272,6 +274,7 @@ impl Default for ViewerState {
fn default() -> Self {
ViewerState {
zoom: None,
fit_up_to_100: false,
pan: [0.0, 0.0],
transparency_grid: false,
show_masks: true,