summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI/Trellis/QtGridSelectionDialog.cpp')
-rw-r--r--Swift/QtUI/Trellis/QtGridSelectionDialog.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/Swift/QtUI/Trellis/QtGridSelectionDialog.cpp b/Swift/QtUI/Trellis/QtGridSelectionDialog.cpp
index 1ca1953..fb9734d 100644
--- a/Swift/QtUI/Trellis/QtGridSelectionDialog.cpp
+++ b/Swift/QtUI/Trellis/QtGridSelectionDialog.cpp
@@ -68,6 +68,10 @@ QSize QtGridSelectionDialog::getMaxGridSize() const {
return maxGridSize;
}
+QSize QtGridSelectionDialog::getFrameSize() const {
+ return frameSize;
+}
+
void QtGridSelectionDialog::keyReleaseEvent(QKeyEvent* event) {
if (event) {
QSize newGridSize = currentGridSize;
@@ -133,13 +137,6 @@ void QtGridSelectionDialog::paintEvent(QPaintEvent*) {
}
void QtGridSelectionDialog::showEvent(QShowEvent*) {
- int xPos = horizontalMargin + frameSize.width() + (padding + frameSize.width()) * (currentGridSize.width() - 1) - frameSize.width()/2;
- int yPos = verticalMargin + frameSize.height() + (padding + frameSize.height()) * (currentGridSize.height() - 1) - frameSize.height()/2;
- // Apply the above offset to the global cursor position (which was positioned at a known position before showing the widget):
- QPoint pos = QCursor::pos();
- pos.rx() += xPos;
- pos.ry() += yPos;
- QCursor::setPos(pos);
setMouseTracking(true);
}