[PATCH 2/2] Depth widget minor UX improvement

Andrey Zhdanov andrjufka at gmail.com
Mon Mar 3 13:09:29 PST 2014


Decrease depth by tapping left part of widget. Icon is showing "up" (i.e. closer to surface).
Increase depth by tapping right part of widget. Icon is showing "down" (i.e. deeper).

Fixes #354

Signed-off-by: Andrey Zhdanov <andrjufka at gmail.com>
---
 qt-ui/diveplanner.cpp | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp
index a4a2ba8..32e9573 100644
--- a/qt-ui/diveplanner.cpp
+++ b/qt-ui/diveplanner.cpp
@@ -134,13 +134,11 @@ DivePlannerGraphics::DivePlannerGraphics(QWidget *parent) : QGraphicsView(parent
 	timeHandler->setZValue(-2);
 	scene()->addItem(timeHandler);
 
-	depthHandler->increaseBtn->setPixmap(QString(":arrow_up"));
-	depthHandler->decreaseBtn->setPixmap(QString(":arrow_down"));
+	depthHandler->increaseBtn->setPixmap(QString(":arrow_down"));
+	depthHandler->decreaseBtn->setPixmap(QString(":arrow_up"));
 	depthHandler->icon->setPixmap(QString(":icon_depth"));
-	// Inverted here in the slots because the 'up' graphi should increase the depness,
-	// and the down should decrease.
-	connect(depthHandler->increaseBtn, SIGNAL(clicked()), this, SLOT(decreaseDepth()));
-	connect(depthHandler->decreaseBtn, SIGNAL(clicked()), this, SLOT(increaseDepth()));
+	connect(depthHandler->decreaseBtn, SIGNAL(clicked()), this, SLOT(decreaseDepth()));
+	connect(depthHandler->increaseBtn, SIGNAL(clicked()), this, SLOT(increaseDepth()));
 	depthHandler->setPos(fromPercent(0, Qt::Horizontal), fromPercent(100, Qt::Vertical));
 	depthHandler->setZValue(-2);
 	scene()->addItem(depthHandler);
-- 
1.8.3.4 (Apple Git-47)



More information about the subsurface mailing list