mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-28 05:11:04 -07:00
Limit draggable component to the main window.
This commit is contained in:
parent
28a14c0a3b
commit
37fddaee5c
2 changed files with 19 additions and 3 deletions
|
|
@ -1782,3 +1782,13 @@ class CuraApplication(QtApplication):
|
|||
# Only show the what's new dialog if there's no machine and we have just upgraded
|
||||
show_whatsnew_only = has_active_machine and has_app_just_upgraded
|
||||
return show_whatsnew_only
|
||||
|
||||
@pyqtSlot(result = int)
|
||||
def appWidth(self) -> int:
|
||||
main_window = cast(UM.Qt.Bindings.MainWindow, QtApplication.getInstance().getMainWindow())
|
||||
return main_window.width()
|
||||
|
||||
@pyqtSlot(result = int)
|
||||
def appHeight(self) -> int:
|
||||
main_window = cast(UM.Qt.Bindings.MainWindow, QtApplication.getInstance().getMainWindow())
|
||||
return main_window.height()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue