summaryrefslogtreecommitdiffstats
path: root/qt-ui/locationinformation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/locationinformation.cpp')
-rw-r--r--qt-ui/locationinformation.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/qt-ui/locationinformation.cpp b/qt-ui/locationinformation.cpp
index 6aad1a3cc..78569c09c 100644
--- a/qt-ui/locationinformation.cpp
+++ b/qt-ui/locationinformation.cpp
@@ -228,7 +228,7 @@ void LocationInformationWidget::resetPallete()
}
SimpleDiveSiteEditDialog::SimpleDiveSiteEditDialog(QWidget *parent) :
- QDialog(parent, Qt::FramelessWindowHint | Qt::WindowSystemMenuHint),
+ QDialog(parent, Qt::FramelessWindowHint | Qt::WindowSystemMenuHint | Qt::Popup),
ui(new Ui::SimpleDiveSiteEditDialog())
{
ui->setupUi(this);
@@ -238,3 +238,18 @@ SimpleDiveSiteEditDialog::~SimpleDiveSiteEditDialog()
{
delete ui;
}
+
+void SimpleDiveSiteEditDialog::showEvent(QShowEvent *ev)
+{
+ const int heigth = 190;
+ const int width = 280;
+
+ QDialog::showEvent(ev);
+ QRect currGeometry = geometry();
+ currGeometry.setX(QCursor::pos().x() + 10);
+ currGeometry.setY(QCursor::pos().y() - heigth / 2);
+ currGeometry.setWidth(width);
+ currGeometry.setHeight(heigth);
+ setGeometry(currGeometry);
+ ev->accept();
+}