-
Notifications
You must be signed in to change notification settings - Fork 67
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
Conversation
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. |
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 |
Wow that's really cool! |
Hey I noticed one more problem with the current version of Thunder that this PR fixes. When you open an image, the nav bar changes to white, but the status bar stays black, meaning you can't see it. In the last demo video, I can see the status bar properly changes to white! I hope this can be reviewed and merged soon. 😊 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! I haven't tested it yet but I'll go ahead and merge this in first. Thanks again for updating the changes with the latest develop
branch!
Hey @CTalvio, just wanted to say I'm really enjoying this change, especially the auto fullscreen! I noticed a (probably rare) edge case where Thunder can get stuck in fullscreen mode when you zoom in and then use the back gesture. I think we probably just need to detect when the image viewer is closing and reset the mode if necessary. It's not a big deal (the fullscreen will fix itself next time you open an image) and I'm not asking you to fix, just pointing it out! Here's a demo of the problem and the fix. qemu-system-x86_64_LyujmGJ6T3.mp4 |
I might be able to look at it. My year is off to a great start (sarcasm) and I won't be able to work for about a week, so I'll have time. Feel free to beat me to the punch tho. |
Oh man I'm sorry to hear that! :( I had a few minutes to take a look and I think I fixed it reliably, but let me know what you think. |
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