From 318256cfb47ee45f8928542e2446aa30bf3de89c Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Fri, 31 Oct 2014 16:01:28 -0200 Subject: Better layout for the filtering widget Fix the layout size, moved some stuff around. Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- qt-ui/listfilter.ui | 33 ++++++++++++++++++++++----------- qt-ui/simplewidgets.cpp | 3 +++ qt-ui/simplewidgets.h | 2 +- 3 files changed, 26 insertions(+), 12 deletions(-) (limited to 'qt-ui') diff --git a/qt-ui/listfilter.ui b/qt-ui/listfilter.ui index 41a8dfa94..016b7769b 100644 --- a/qt-ui/listfilter.ui +++ b/qt-ui/listfilter.ui @@ -1,7 +1,7 @@ - TagFilter - + FilterWidget + 0 @@ -15,17 +15,28 @@ - - - TextLabel - - + + + + + TextLabel + + + + + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + Filter this list + + + + - - - - + diff --git a/qt-ui/simplewidgets.cpp b/qt-ui/simplewidgets.cpp index 710d0c3a7..bacaad5c4 100644 --- a/qt-ui/simplewidgets.cpp +++ b/qt-ui/simplewidgets.cpp @@ -460,6 +460,9 @@ TagFilter::TagFilter(QWidget *parent) : QWidget(parent) { ui.setupUi(this); ui.label->setText(tr("Tags: ")); +#if QT_VERSION >= 0x050000 + ui.filterInternalList->setClearButtonEnabled(true); +#endif QSortFilterProxyModel *filter = new QSortFilterProxyModel(); filter->setSourceModel(TagFilterModel::instance()); connect(ui.filterInternalList, SIGNAL(textChanged(QString)), filter, SLOT(setFilterFixedString(QString))); diff --git a/qt-ui/simplewidgets.h b/qt-ui/simplewidgets.h index d4eece859..f90e5478c 100644 --- a/qt-ui/simplewidgets.h +++ b/qt-ui/simplewidgets.h @@ -12,7 +12,7 @@ class QAbstractButton; #include "ui_shifttimes.h" #include "ui_shiftimagetimes.h" #include "ui_divecomponentselection.h" -#include "ui_tagfilter.h" +#include "ui_listfilter.h" #include "exif.h" class MinMaxAvgWidget : public QWidget { -- cgit v1.2.3-70-g09d2