mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
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>
This commit is contained in:
parent
b68e86a141
commit
55f8979160
1 changed files with 4 additions and 4 deletions
|
@ -101,20 +101,21 @@ DivePlannerGraphics::DivePlannerGraphics(QWidget* parent): QGraphicsView(parent)
|
||||||
|
|
||||||
plusTime = new Button();
|
plusTime = new Button();
|
||||||
plusTime->setPixmap(QPixmap(":plus"));
|
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");
|
plusTime->setToolTip("Increase minimum dive time by 10m");
|
||||||
scene()->addItem(plusTime);
|
scene()->addItem(plusTime);
|
||||||
connect(plusTime, SIGNAL(clicked()), this, SLOT(increaseTime()));
|
connect(plusTime, SIGNAL(clicked()), this, SLOT(increaseTime()));
|
||||||
|
|
||||||
okBtn = new Button();
|
okBtn = new Button();
|
||||||
okBtn->setText(tr("Ok"));
|
okBtn->setText(tr("Ok"));
|
||||||
okBtn->setPos(1, 190);
|
okBtn->setPos(fromPercent(1, Qt::Horizontal), fromPercent(95, Qt::Vertical));
|
||||||
scene()->addItem(okBtn);
|
scene()->addItem(okBtn);
|
||||||
connect(okBtn, SIGNAL(clicked()), this, SLOT(okClicked()));
|
connect(okBtn, SIGNAL(clicked()), this, SLOT(okClicked()));
|
||||||
|
|
||||||
cancelBtn = new Button();
|
cancelBtn = new Button();
|
||||||
cancelBtn->setText(tr("Cancel"));
|
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);
|
scene()->addItem(cancelBtn);
|
||||||
connect(cancelBtn, SIGNAL(clicked()), this, SLOT(cancelClicked()));
|
connect(cancelBtn, SIGNAL(clicked()), this, SLOT(cancelClicked()));
|
||||||
|
|
||||||
|
@ -131,7 +132,6 @@ qreal DivePlannerGraphics::fromPercent(qreal percent, Qt::Orientation orientatio
|
||||||
|
|
||||||
void DivePlannerGraphics::cancelClicked()
|
void DivePlannerGraphics::cancelClicked()
|
||||||
{
|
{
|
||||||
qDebug() << "clicked";
|
|
||||||
mainWindow()->showProfile();
|
mainWindow()->showProfile();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue