Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated image viewer restructure #1645

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

CTalvio
Copy link
Collaborator

@CTalvio CTalvio commented Dec 18, 2024

Pull Request Description

I used a stack to make the image viewer widget the size of the screen, which seems to be the only way to avoid the bugs the current viewer is suffering from.

Hence the scaffold and appbar get ditched in favor of simple containers for any buttons we need, stacked atop the image.

I found that layoutInsets can be used to have the initial size of the image limited to the are that is not covered by buttons.

Not in the earlier PR, here I also added prevention for images to be saved twice.

Issue Being Fixed

The inability of the image to fill the screen in some circumstances, causing it to get cut off for seemingly no reason. This was especially prevalent in landscape aspect ratios.

Screenshots / Recordings

Kooha-2024-05-03-22-54-31.mp4

Best illustrated when built into a resizable desktop app. Images always start off not covering the top and bottom bar, but when zoomed utilize the full screen.

Checklist

  • Did you use localized strings (and added appropriate descriptions) where applicable?

@CTalvio
Copy link
Collaborator Author

CTalvio commented Dec 18, 2024

Also tested in emulator. Correctly respects system top/bottom bars, but now always uses the full screen to display zoomed images.

Worth considering: Automatically go into the "fullscreen" mode on zoom.

@CTalvio
Copy link
Collaborator Author

CTalvio commented Dec 19, 2024

Added: Dynamic fullscreen behaviour.

Above 1.2 zoom, the viewer will automatically enter the full screen mode, hiding all UI elements, now also including system.

Full screen is exited below 1.2 zoom, or if the user taps the screen without changing the zoom level.

Screen_recording_20241219_143045.mp4

@micahmo
Copy link
Member

micahmo commented Dec 19, 2024

Wow that's really cool!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants