From 033da11364312337915894ef03f35aa051e50171 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Thu, 18 Jun 2020 22:18:19 +0200 Subject: [PATCH] LibGUI: Fix MessageBox width calculation not including the icon width --- Libraries/LibGUI/MessageBox.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Libraries/LibGUI/MessageBox.cpp b/Libraries/LibGUI/MessageBox.cpp index e9097ce5df..df357a02fb 100644 --- a/Libraries/LibGUI/MessageBox.cpp +++ b/Libraries/LibGUI/MessageBox.cpp @@ -120,6 +120,8 @@ void MessageBox::build() if (m_type != Type::None) { auto& icon_image = message_container.add(); icon_image.set_bitmap(icon()); + if (icon()) + icon_width = icon()->width(); } auto& label = message_container.add