mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-13 23:16:06 +08:00
Fix typing. [CURA-6478]
This commit is contained in:
parent
c3a9ceaa18
commit
ad9fc62ff5
@ -23,6 +23,7 @@ from UM.Platform import Platform
|
||||
from UM.PluginError import PluginNotFoundError
|
||||
from UM.Resources import Resources
|
||||
from UM.Preferences import Preferences
|
||||
from UM.Qt.Bindings import MainWindow
|
||||
from UM.Qt.QtApplication import QtApplication # The class we're inheriting from.
|
||||
import UM.Util
|
||||
from UM.View.SelectionPass import SelectionPass # For typing.
|
||||
@ -1789,10 +1790,16 @@ class CuraApplication(QtApplication):
|
||||
|
||||
@pyqtSlot(result = int)
|
||||
def appWidth(self) -> int:
|
||||
main_window = cast(UM.Qt.Bindings.MainWindow, QtApplication.getInstance().getMainWindow())
|
||||
main_window = QtApplication.getInstance().getMainWindow()
|
||||
if main_window:
|
||||
return main_window.width()
|
||||
else:
|
||||
return 0
|
||||
|
||||
@pyqtSlot(result = int)
|
||||
def appHeight(self) -> int:
|
||||
main_window = cast(UM.Qt.Bindings.MainWindow, QtApplication.getInstance().getMainWindow())
|
||||
main_window = QtApplication.getInstance().getMainWindow()
|
||||
if main_window:
|
||||
return main_window.height()
|
||||
else:
|
||||
return 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user