From 64b7a3b85f4f0ad2592105397289684055691cb0 Mon Sep 17 00:00:00 2001 From: Andrey Zhdanov Date: Mon, 3 Mar 2014 23:09:29 +0200 Subject: [PATCH] Depth widget minor UX improvement 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 Signed-off-by: Dirk Hohndel --- 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 a4a2ba861..32e957363 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);