mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +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…
Add table
Reference in a new issue