-
Notifications
You must be signed in to change notification settings - Fork 41
Open
Labels
enhancementNew feature or requestNew feature or request
Description
PR #565 introduced a new ImageViewer widget that downloads and displays the full-screen version of an image upon clicking on a thumbnail in the timeline. While this image viewer is fully functional, there are some visual and functional improvements that can be made.
Here's an example screenshot:
- After loading the full-size image, it should fill the entire view by default.
- Currently, the full-size image only takes up a small part of the view by default (see above screenshot). This will force the user to manually click the zoom in button several times.
- Allow zooming in much further.
- Ideally we shouldn't restrict the zoom-in amount at all, since some images may have very small text that requires the user to zoom in 100x just to read it.
- Make the background partially transparent instead of just opaque white.
- This should match other modals where we have a slightly-transparent dark gray overlay as the background, but in this case the background should be more opaque than other modals in order to make the image stand out more clearly.
- Make the rotation animation faster — it should take no more than 200-300 milliseconds, perhaps even faster.
- Reformat the buttons to look better.
- Add padding to the view group of buttons so that they're further away from the edge of the window. They should line up horizontally with the image metadata view on the upper left.
- We should use the
RobrixIconButtonwidget such that the button style is consistent with other buttons. For example, look at theXclose button on the settings screen.
- Add a "reset view" button that resets the pan/zoom settings to the default, which is just the image filling the view with no rotation.
- Handle the regular set of actions/gestures that close the modal: pressing Escape, the back navigational gesture on Android, etc.
- This can be achieved using by handling the
ModalAction::Dismissedaction, like we do here:robrix/src/verification_modal.rs
Lines 147 to 163 in 70bfd7f
let modal_dismissed = actions .iter() .any(|a| matches!(a.downcast_ref(), Some(ModalAction::Dismissed))); if cancel_button_clicked || modal_dismissed { if let Some(state) = self.state.as_ref() { let _ = state.response_sender.send(VerificationUserResponse::Cancel); } self.reset_state(); // If the modal was dismissed by clicking outside of it, we MUST NOT emit // a `VerificationModalAction::Close` action, as that would cause // an infinite action feedback loop. if !modal_dismissed { cx.action(VerificationModalAction::Close); } }
- This can be achieved using by handling the
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request