From ad603b6e9f0b03032ba0f04c6cec0a5e9b10514b Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sun, 16 Nov 2014 18:10:26 +0000 Subject: Improve the filter message and placement This makes the text easier to translate (and more meaningful). Also modifies its position to be centereed in order to look less "squeezed into the corner". Signed-off-by: Dirk Hohndel --- qt-ui/filterwidget.ui | 15 ++++++++++++++- qt-ui/simplewidgets.cpp | 3 +-- 2 files changed, 15 insertions(+), 3 deletions(-) (limited to 'qt-ui') diff --git a/qt-ui/filterwidget.ui b/qt-ui/filterwidget.ui index 4b5f9d9d4..f8f0547b7 100644 --- a/qt-ui/filterwidget.ui +++ b/qt-ui/filterwidget.ui @@ -34,6 +34,19 @@ 0 + + + + Qt::Horizontal + + + + 40 + 20 + + + + @@ -112,7 +125,7 @@ 0 0 594 - 332 + 337 diff --git a/qt-ui/simplewidgets.cpp b/qt-ui/simplewidgets.cpp index 1020e0ec3..4b3d789e7 100644 --- a/qt-ui/simplewidgets.cpp +++ b/qt-ui/simplewidgets.cpp @@ -598,8 +598,7 @@ MultiFilter::MultiFilter(QWidget *parent) : QWidget(parent) void MultiFilter::filterFinished() { - ui->filterText->setText(tr("Dives filtered out: ") + QString::number(MultiFilterSortModel::instance()->divesFilteredOut) - + tr("Dives being shown: ") + QString::number(MultiFilterSortModel::instance()->divesDisplayed)); + ui->filterText->setText(tr("Filter shows %1 (of %2) dives").arg(MultiFilterSortModel::instance()->divesDisplayed).arg(dive_table.nr)); } void MultiFilter::adjustHeight() -- cgit v1.2.3-70-g09d2