summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2014-11-16 18:10:26 +0000
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-11-16 18:36:42 +0000
commitad603b6e9f0b03032ba0f04c6cec0a5e9b10514b (patch)
tree6385a7ba695be45ad0d5dad58ca71ddca043d9dd
parent7c5c38b154baeeb05d2c70a3c248cda41349133a (diff)
downloadsubsurface-ad603b6e9f0b03032ba0f04c6cec0a5e9b10514b.tar.gz
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 <dirk@hohndel.org>
-rw-r--r--qt-ui/filterwidget.ui15
-rw-r--r--qt-ui/simplewidgets.cpp3
2 files changed, 15 insertions, 3 deletions
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
@@ -35,6 +35,19 @@
<number>0</number>
</property>
<item>
+ <spacer name="horizontalSpacer_2">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
<widget class="QLabel" name="filterText">
<property name="text">
<string/>
@@ -112,7 +125,7 @@
<x>0</x>
<y>0</y>
<width>594</width>
- <height>332</height>
+ <height>337</height>
</rect>
</property>
</widget>
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()