From ff321d53ef8588f55154166ca44f773a97f8c74a Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sat, 22 Jun 2019 10:50:58 +0200 Subject: [PATCH] GComboBox: Don't make the list window wider than the widget unless needed. --- LibGUI/GComboBox.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LibGUI/GComboBox.cpp b/LibGUI/GComboBox.cpp index 3b5c949e0d..a552c4d255 100644 --- a/LibGUI/GComboBox.cpp +++ b/LibGUI/GComboBox.cpp @@ -73,7 +73,7 @@ void GComboBox::open() longest_item_width = max(longest_item_width, m_list_view->font().width(item_text)); } Size size { - max(width(), longest_item_width + m_list_view->width_occupied_by_vertical_scrollbar()) + m_list_view->frame_thickness() * 2 + m_list_view->horizontal_padding(), + max(width(), longest_item_width + m_list_view->width_occupied_by_vertical_scrollbar() + m_list_view->frame_thickness() * 2 + m_list_view->horizontal_padding()), model()->row_count() * m_list_view->item_height() + m_list_view->frame_thickness() * 2 };