diff --git a/src/gui/categoryfilterwidget.cpp b/src/gui/categoryfilterwidget.cpp index 01cc8281f..0bdc5ac67 100644 --- a/src/gui/categoryfilterwidget.cpp +++ b/src/gui/categoryfilterwidget.cpp @@ -167,11 +167,10 @@ void CategoryFilterWidget::callUpdateGeometry() QSize CategoryFilterWidget::sizeHint() const { + const QSize viewportSize {viewportSizeHint()}; return { - // Width should be exactly the width of the content - sizeHintForColumn(0), - // Height should be exactly the height of the content - static_cast(sizeHintForRow(0) * (model()->rowCount() + 0.5)), + viewportSize.width(), + viewportSize.height() + static_cast(0.5 * sizeHintForRow(0)) }; }