python3-occ: patch for python 3.10
This commit is contained in:
parent
a8b935d24f
commit
3be1182391
|
@ -0,0 +1,15 @@
|
||||||
|
diff --git a/src/Display/SimpleGui.py b/src/Display/SimpleGui.py
|
||||||
|
index 42705a82..6a274c16 100644
|
||||||
|
--- a/src/Display/SimpleGui.py
|
||||||
|
+++ b/src/Display/SimpleGui.py
|
||||||
|
@@ -161,8 +161,8 @@ def init_display(backend_str: Optional[str]=None,
|
||||||
|
def centerOnScreen(self) -> None:
|
||||||
|
'''Centers the window on the screen.'''
|
||||||
|
resolution = QtWidgets.QApplication.desktop().screenGeometry()
|
||||||
|
- x = (resolution.width() - self.frameSize().width()) / 2
|
||||||
|
- y = (resolution.height() - self.frameSize().height()) / 2
|
||||||
|
+ x = (resolution.width() - self.frameSize().width()) // 2
|
||||||
|
+ y = (resolution.height() - self.frameSize().height()) // 2
|
||||||
|
self.move(x, y)
|
||||||
|
|
||||||
|
def add_menu(self, menu_name: str) -> None:
|
|
@ -1,7 +1,7 @@
|
||||||
# Template file for 'python3-occ'
|
# Template file for 'python3-occ'
|
||||||
pkgname=python3-occ
|
pkgname=python3-occ
|
||||||
version=7.4.1
|
version=7.4.1
|
||||||
revision=2
|
revision=3
|
||||||
archs="i686* x86_64* armv7l* aarch64* ppc*"
|
archs="i686* x86_64* armv7l* aarch64* ppc*"
|
||||||
wrksrc="pythonocc-core-${version}"
|
wrksrc="pythonocc-core-${version}"
|
||||||
build_style=cmake
|
build_style=cmake
|
||||||
|
|
Loading…
Reference in New Issue