React to moveEvent in media viewer
This commit is contained in:
parent
99b7f051c7
commit
1fc24398a0
|
@ -481,13 +481,20 @@ void OverlayWidget::updateGeometry() {
|
||||||
setGeometry(available);
|
setGeometry(available);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void OverlayWidget::moveEvent(QMoveEvent *e) {
|
||||||
|
const auto newPos = e->pos();
|
||||||
|
DEBUG_LOG(("Viewer Pos: Moved to %1, %2")
|
||||||
|
.arg(newPos.x())
|
||||||
|
.arg(newPos.y()));
|
||||||
|
moveToScreen();
|
||||||
|
OverlayParent::moveEvent(e);
|
||||||
|
}
|
||||||
|
|
||||||
void OverlayWidget::resizeEvent(QResizeEvent *e) {
|
void OverlayWidget::resizeEvent(QResizeEvent *e) {
|
||||||
const auto newGeometry = geometry();
|
const auto newSize = e->size();
|
||||||
DEBUG_LOG(("Viewer Pos: Resized to %1, %2, %3, %4")
|
DEBUG_LOG(("Viewer Pos: Resized to %1, %2")
|
||||||
.arg(newGeometry.x())
|
.arg(newSize.width())
|
||||||
.arg(newGeometry.y())
|
.arg(newSize.height()));
|
||||||
.arg(newGeometry.width())
|
|
||||||
.arg(newGeometry.height()));
|
|
||||||
updateControlsGeometry();
|
updateControlsGeometry();
|
||||||
OverlayParent::resizeEvent(e);
|
OverlayParent::resizeEvent(e);
|
||||||
}
|
}
|
||||||
|
|
|
@ -170,6 +170,7 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
void paintEvent(QPaintEvent *e) override;
|
void paintEvent(QPaintEvent *e) override;
|
||||||
|
void moveEvent(QMoveEvent *e) override;
|
||||||
void resizeEvent(QResizeEvent *e) override;
|
void resizeEvent(QResizeEvent *e) override;
|
||||||
|
|
||||||
void keyPressEvent(QKeyEvent *e) override;
|
void keyPressEvent(QKeyEvent *e) override;
|
||||||
|
|
Loading…
Reference in New Issue