diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2014-11-03 17:39:31 -0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-11-03 14:33:15 -0800 |
commit | c65583671b86cdba93b31ea9ad29307179af703b (patch) | |
tree | 488a7d8a2e184ce9a986f8e93eed98042ed5b6d4 /qt-ui/simplewidgets.cpp | |
parent | 5fa2851bdf9bb3968054bf288f96cc832196ba35 (diff) | |
download | subsurface-c65583671b86cdba93b31ea9ad29307179af703b.tar.gz |
Fix position and size of the Filter
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/simplewidgets.cpp')
-rw-r--r-- | qt-ui/simplewidgets.cpp | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/qt-ui/simplewidgets.cpp b/qt-ui/simplewidgets.cpp index a5707c34d..522ed30e9 100644 --- a/qt-ui/simplewidgets.cpp +++ b/qt-ui/simplewidgets.cpp @@ -536,13 +536,23 @@ MultiFilter::MultiFilter(QWidget *parent) : QScrollArea(parent) QWidget *w = new QWidget(); QHBoxLayout *l = new QHBoxLayout(); - l->addWidget(new TagFilter()); + TagFilter *tagFilter = new TagFilter(); + int minimumHeight = tagFilter->ui.filterInternalList->height() + + tagFilter->ui.verticalLayout->spacing() * tagFilter->ui.verticalLayout->count(); + + QListView *dummyList = new QListView(); + QStringListModel *dummy = new QStringListModel(QStringList() << "Dummy Text"); + dummyList->setModel(dummy); + + l->addWidget(tagFilter); l->addWidget(new BuddyFilter()); l->addWidget(new LocationFilter()); - l->setContentsMargins(0, 0, 0, 0); - l->setSpacing(1); + l->setSpacing(0); + w->setLayout(l); - w->setMinimumSize(l->count() * 150, 200); setWidget(w); + w->resize(w->width(), minimumHeight + dummyList->sizeHintForRow(0) * 5 ); + + setMinimumHeight(w->height()); } |