feat: change scale limits

zooming in a lot is sometimes useful,
but zooming out is basically useless and annoying
(when you want to put it back to covering the full window)

if you really need to zoom out, you can always resize the window
This commit is contained in:
electria 2026-07-30 19:21:12 -07:00
commit 97ce6754dd
Signed by: electria
SSH key fingerprint: SHA256:8LlB3ucPbBHqozqkhsNbaV5oG3SlzzqUj8FZDL6IPQs

View file

@ -42,6 +42,8 @@ impl State {
if let Some(allocation) = self.image_display.as_ref() { if let Some(allocation) = self.image_display.as_ref() {
widget::image::viewer(allocation.handle().clone()) widget::image::viewer(allocation.handle().clone())
.filter_method(self.image_filter) .filter_method(self.image_filter)
.max_scale(50.)
.min_scale(1.)
.width(Length::Fill) .width(Length::Fill)
.height(Length::Fill) .height(Length::Fill)
.into() .into()