-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Is your issue REALLY a bug?
- My issue is indeed a bug!
- I am not crazy! I will not fill out this form just to ask a question or request a feature. Pinky promise.
Is there an existing issue for this?
- I have searched the existing issues.
Is this issue related to iced?
- My hardware is compatible and my graphics drivers are up-to-date.
What happened?
When using the Viewer widget, the image is always cropped at the bottom and right edges once it exceeds the container after zooming.
Screencast_1.webm
example:
use iced::widget::{
center,
image::{Handle, viewer},
};
pub fn main() -> iced::Result {
iced::application(App::new, App::update, App::view).run()
}
#[derive(Debug, Clone)]
enum Message {}
struct App {
handle: Handle,
}
impl App {
fn new() -> Self {
Self {
handle: Handle::from_path("ferris.png"),
}
}
fn update(&mut self, _: Message) {}
fn view(&self) -> iced::Element<'_, Message> {
center(viewer(self.handle.clone())).into()
}
}
What is the expected behavior?
When the zoomed image exceeds the container, it should not be cropped at the bottom or right edges.
Screencast_2.webm
Version
master
Operating System
Linux
Do you have any log output?
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working