mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 08:24:53 +01:00
Merged in feature/PYPE-491_fix_fpx_fix (pull request #281)
feature-PYPE-491_fix_fpx_fix Approved-by: Milan Kolar <milan@orbi.tools>
This commit is contained in:
commit
ef9d313590
1 changed files with 20 additions and 0 deletions
|
|
@ -124,6 +124,26 @@ class Popup2(Popup):
|
||||||
fix = self.widgets["show"]
|
fix = self.widgets["show"]
|
||||||
fix.setText("Fix")
|
fix.setText("Fix")
|
||||||
|
|
||||||
|
def calculate_window_geometry(self):
|
||||||
|
"""Respond to status changes
|
||||||
|
|
||||||
|
On creation, align window with screen bottom right.
|
||||||
|
|
||||||
|
"""
|
||||||
|
parent_widget = self.parent()
|
||||||
|
|
||||||
|
app = QtWidgets.QApplication.instance()
|
||||||
|
if parent_widget:
|
||||||
|
screen = app.desktop().screenNumber(parent_widget)
|
||||||
|
else:
|
||||||
|
screen = app.desktop().screenNumber(app.desktop().cursor().pos())
|
||||||
|
center_point = app.desktop().screenGeometry(screen).center()
|
||||||
|
|
||||||
|
frame_geo = self.frameGeometry()
|
||||||
|
frame_geo.moveCenter(center_point)
|
||||||
|
|
||||||
|
return frame_geo
|
||||||
|
|
||||||
|
|
||||||
@contextlib.contextmanager
|
@contextlib.contextmanager
|
||||||
def application():
|
def application():
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue