mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-17 20:16:16 +00:00
Remove empty vertical space from filter QListWidget
In the filter the dropdown lists for selecting dive mode or day-of-week has a lot of white space at the bottom. This PR removes that white space. Actually the white space at the bottom of a QListWidget appears to be a known bug (actually an omission) for the current Qt V15. The above solution is a brute-force workaround to achieve the same end result. The active line is actually the setFixedSize(). The other line, however, comprises good QT layout policy to minimise widget size. Signed-off-by: willemferguson <willemferguson@zoology.up.ac.za>
This commit is contained in:
parent
b3f5473b66
commit
a3e990dfd5
1 changed files with 2 additions and 0 deletions
|
@ -45,7 +45,9 @@ static QListWidget *makeMultipleChoice(const QModelIndex &index, int role)
|
|||
return nullptr;
|
||||
QListWidget *res = new QListWidget;
|
||||
res->addItems(list);
|
||||
res->setSizePolicy(QSizePolicy::Maximum,QSizePolicy::Maximum);
|
||||
res->setSelectionMode(QAbstractItemView::ExtendedSelection);
|
||||
res->setFixedSize(res->sizeHintForColumn(0) + 2 * res->frameWidth(), res->sizeHintForRow(0) * res->count() + 2 * res->frameWidth());
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue