mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:18:11 +00:00
ImageViewer: Use scaled image size when resizing window to fit it
When the image is flipped or rotated, the window is resized to ensure that the image still fits in the frame. However, currently the original bitmap rect is used, which doesn't take into account the scaling factor. Fix this by using the scaled rect instead.
This commit is contained in:
parent
05d7ac1193
commit
72f1e23e6b
1 changed files with 1 additions and 1 deletions
|
@ -299,7 +299,7 @@ void ViewWidget::resize_window()
|
|||
if (!m_bitmap)
|
||||
return;
|
||||
|
||||
auto new_size = m_bitmap->size();
|
||||
auto new_size = m_bitmap_rect.size();
|
||||
|
||||
if (new_size.width() < 300)
|
||||
new_size.set_width(300);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue