diff options
author | Tomaz Canabrava <tcanabrava@kde.org> | 2013-07-04 09:45:25 -0300 |
---|---|---|
committer | Tomaz Canabrava <tcanabrava@kde.org> | 2013-07-04 09:45:25 -0300 |
commit | 55f8979160080998e5353a5cbecf00e9995c5db2 (patch) | |
tree | db158dd68c893a9838246638be53114952a25195 /qt-ui | |
parent | b68e86a141ae11b4341a3d0134cfeb5efea911f0 (diff) | |
download | subsurface-55f8979160080998e5353a5cbecf00e9995c5db2.tar.gz |
Better positioning of buttons on dive planner
Better positioning of buttons on the dive planner. The ok / cancel
buttons are in the correct place, and the '+' sign for time will not
overlap the time string anymore.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/diveplanner.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp index b0a763a04..8b82d9573 100644 --- a/qt-ui/diveplanner.cpp +++ b/qt-ui/diveplanner.cpp @@ -101,20 +101,21 @@ DivePlannerGraphics::DivePlannerGraphics(QWidget* parent): QGraphicsView(parent) plusTime = new Button(); plusTime->setPixmap(QPixmap(":plus")); - plusTime->setPos(fromPercent(90, Qt::Horizontal), fromPercent(95, Qt::Vertical)); + plusTime->setPos(fromPercent(95, Qt::Horizontal), fromPercent(95, Qt::Vertical)); plusTime->setToolTip("Increase minimum dive time by 10m"); scene()->addItem(plusTime); connect(plusTime, SIGNAL(clicked()), this, SLOT(increaseTime())); okBtn = new Button(); okBtn->setText(tr("Ok")); - okBtn->setPos(1, 190); + okBtn->setPos(fromPercent(1, Qt::Horizontal), fromPercent(95, Qt::Vertical)); scene()->addItem(okBtn); connect(okBtn, SIGNAL(clicked()), this, SLOT(okClicked())); cancelBtn = new Button(); cancelBtn->setText(tr("Cancel")); - cancelBtn->setPos(10,190); + cancelBtn->setPos(okBtn->pos().x() + okBtn->boundingRect().width() + fromPercent(2, Qt::Horizontal), + fromPercent(95, Qt::Vertical)); scene()->addItem(cancelBtn); connect(cancelBtn, SIGNAL(clicked()), this, SLOT(cancelClicked())); @@ -131,7 +132,6 @@ qreal DivePlannerGraphics::fromPercent(qreal percent, Qt::Orientation orientatio void DivePlannerGraphics::cancelClicked() { - qDebug() << "clicked"; mainWindow()->showProfile(); } |