Commit cdecaa5a authored by Daniel Teske's avatar Daniel Teske
Browse files

SettingsDialog: Update size of category view on showing/hiding scrollbar

On a german locale the category view has a horizontal scrollbar. This is
because the initial sizeHint is calculated while the vertical scrollbar
is not visible. This patch ensures that the sizeHint is updated if the
scrollbar is shown.

Change-Id: Ic97c0c3650f765dbf6d8f84f2c168630c65ee89f
Reviewed-by: default avatarEike Ziller <>
parent fa36673e
......@@ -248,6 +248,7 @@ public:
setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Expanding);
setItemDelegate(new CategoryListViewDelegate(this));
virtual QSize sizeHint() const
......@@ -257,6 +258,16 @@ public:
width += verticalScrollBar()->width();
return QSize(width, 100);
// QListView installs a event filter on its scrollbars
virtual bool eventFilter(QObject *obj, QEvent *event)
if (obj == verticalScrollBar()
&& (event->type() == QEvent::Show
|| event->type() == QEvent::Hide))
return QListView::eventFilter(obj, event);
// ----------- SettingsDialog
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment