Skip to content

Commit e4cd09e

Browse files
committed
fix: in Windows11, dialog disappear to random place when drag to enter dialog mode
1 parent 66aeb92 commit e4cd09e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

plugindevtools/PluginDevTools/PluginDevToolsStatusManager.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@ def applyDialogMode(self, senderName=str()):
8383
self.dialog.setCentralWidget(self.centralwidget)
8484
self.dialog.show()
8585
self.dialog.activateWindow()
86+
newWidth = self.dialog.size().width()
87+
newPoint = QCursor.pos()
88+
newPoint.setX(newPoint.x()-int(newWidth/2))
89+
self.dialog.move(self.dialog.mapFrom(self.dialog, newPoint))
8690
type(self).mutex.unlock()
8791

8892

0 commit comments

Comments
 (0)