mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:47:44 +00:00
ImageViewer: Scale image to window on resize
This commit is contained in:
parent
d8819c2d0e
commit
17eb77cf55
2 changed files with 7 additions and 0 deletions
|
@ -213,6 +213,12 @@ void ViewWidget::drop_event(GUI::DropEvent& event)
|
|||
on_drop(event);
|
||||
}
|
||||
|
||||
void ViewWidget::resize_event(GUI::ResizeEvent& event)
|
||||
{
|
||||
event.accept();
|
||||
scale_image_for_window();
|
||||
}
|
||||
|
||||
void ViewWidget::scale_image_for_window()
|
||||
{
|
||||
set_original_rect(m_bitmap->rect());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue