mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
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 <andrjufka@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
7c535452f9
commit
64b7a3b85f
1 changed files with 4 additions and 6 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue