Skip to content

Commit

Permalink
Fix CategoryFilterWidget::sizeHint()
Browse files Browse the repository at this point in the history
  • Loading branch information
glassez committed Sep 1, 2017
1 parent 4cd3a37 commit c6dfdf9
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/gui/categoryfilterwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<int>(sizeHintForRow(0) * (model()->rowCount() + 0.5)),
viewportSize.width(),
viewportSize.height() + static_cast<int>(0.5 * sizeHintForRow(0))
};
}

Expand Down

0 comments on commit c6dfdf9

Please sign in to comment.