centralizing gem selector panel

This commit is contained in:
Vinicius Moreira
2019-09-12 12:24:49 -03:00
parent 40a8d19584
commit 32ad34b170
3 changed files with 14 additions and 10 deletions

9
bauh/view/qt/qt_utils.py Normal file
View File

@@ -0,0 +1,9 @@
from PyQt5.QtWidgets import QWidget, QApplication
def centralize(widget: QWidget):
geo = widget.frameGeometry()
screen = QApplication.desktop().screenNumber(QApplication.desktop().cursor().pos())
center_point = QApplication.desktop().screenGeometry(screen).center()
geo.moveCenter(center_point)
widget.move(geo.topLeft())