mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-10 11:36:22 +00:00
ImageViewer: Do not resize the window if the image fits into the window
This commit is contained in:
parent
63e78ccd9f
commit
41ebb12c9e
Notes:
sideshowbarker
2024-07-18 08:40:11 +09:00
Author: https://github.com/abyesilyurt
Commit: 41ebb12c9e
Pull-request: https://github.com/SerenityOS/serenity/pull/8734
Reviewed-by: https://github.com/kleinesfilmroellchen
1 changed files with 6 additions and 1 deletions
|
@ -277,7 +277,12 @@ void ViewWidget::drop_event(GUI::DropEvent& event)
|
||||||
|
|
||||||
void ViewWidget::resize_window()
|
void ViewWidget::resize_window()
|
||||||
{
|
{
|
||||||
if (window()->is_fullscreen())
|
if (window()->is_fullscreen() || window()->is_maximized())
|
||||||
|
return;
|
||||||
|
|
||||||
|
auto absolute_bitmap_rect = m_bitmap_rect;
|
||||||
|
absolute_bitmap_rect.translate_by(window()->rect().top_left());
|
||||||
|
if (window()->rect().contains(absolute_bitmap_rect))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!m_bitmap)
|
if (!m_bitmap)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue