From 0d4916d033fe146bb7f7a34ec2ec6bb2c05fd3f3 Mon Sep 17 00:00:00 2001 From: "B.Melnik" Date: Mon, 19 Jul 2021 15:56:43 +0300 Subject: [PATCH] fix: show status window in center --- .../lib/include/DOtherSide/DOtherSideStatusWindow.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/vendor/DOtherSide/lib/include/DOtherSide/DOtherSideStatusWindow.h b/vendor/DOtherSide/lib/include/DOtherSide/DOtherSideStatusWindow.h index fc97ed0660..c10929d50b 100644 --- a/vendor/DOtherSide/lib/include/DOtherSide/DOtherSideStatusWindow.h +++ b/vendor/DOtherSide/lib/include/DOtherSide/DOtherSideStatusWindow.h @@ -2,6 +2,7 @@ #define STATUSWINDOW_H #include +#include class StatusWindow: public QQuickWindow { @@ -17,6 +18,13 @@ public: bool isFullScreen() const; + Q_INVOKABLE void updatePosition() { + auto point = QPoint(screen()->geometry().center().x() - geometry().width() / 2, screen()->geometry().center().y() - geometry().height() / 2); + if (point != this->position()) { + this->setPosition(point); + } + } + signals: void isFullScreenChanged();