1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:57:44 +00:00

LibGUI: Don't fix ImageWidget's size when disabling auto_resize()

This commit is contained in:
thankyouverycool 2023-04-29 10:41:59 -04:00 committed by Andreas Kling
parent b17d4a0ced
commit 59483b0654

View file

@ -44,9 +44,10 @@ void ImageWidget::set_bitmap(Gfx::Bitmap const* bitmap)
void ImageWidget::set_auto_resize(bool value)
{
if (m_auto_resize == value)
return;
m_auto_resize = value;
if (m_bitmap)
if (m_bitmap && m_auto_resize)
set_fixed_size(m_bitmap->size());
}