Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Games
Kajongg
Commits
b647417e
Commit
b647417e
authored
Dec 18, 2021
by
Antonio Rojas
Committed by
Albert Astals Cid
Dec 18, 2021
Browse files
Fix running with Python 3.10
parent
1c32c395
Pipeline
#111756
passed with stage
in 49 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/board.py
View file @
b647417e
...
...
@@ -102,7 +102,7 @@ class PlayerWind(AnimatedMixin, QGraphicsObject, StrMixin):
"""paint the marker"""
with
Painter
(
painter
):
painter
.
setBrush
(
self
.
__brush
)
size
=
Internal
.
scene
.
windTileset
.
faceSize
.
height
()
size
=
int
(
Internal
.
scene
.
windTileset
.
faceSize
.
height
()
)
ellRect
=
QRectF
(
QPoint
(),
QPoint
(
size
,
size
))
painter
.
drawEllipse
(
ellRect
)
renderer
=
Internal
.
scene
.
windTileset
.
renderer
()
...
...
@@ -112,7 +112,7 @@ class PlayerWind(AnimatedMixin, QGraphicsObject, StrMixin):
def
boundingRect
(
self
):
# pylint: disable=no-self-use
"""define the part of the tile we want to see"""
size
=
Internal
.
scene
.
windTileset
.
faceSize
.
height
()
*
1.1
size
=
int
(
Internal
.
scene
.
windTileset
.
faceSize
.
height
()
*
1.1
)
return
QRectF
(
QPoint
(),
QPoint
(
size
,
size
))
def
__str__
(
self
):
...
...
@@ -878,11 +878,11 @@ class FittingView(QGraphicsView):
tRect
=
uiTile
.
boundingRect
()
tRect
=
self
.
viewportTransform
().
mapRect
(
tRect
)
pmapSize
=
QSize
(
tRect
.
width
()
*
uiTile
.
scale
,
tRect
.
height
()
*
uiTile
.
scale
)
int
(
tRect
.
width
()
*
uiTile
.
scale
)
,
int
(
tRect
.
height
()
*
uiTile
.
scale
)
)
pMap
=
uiTile
.
pixmapFromSvg
(
pmapSize
)
drag
.
setPixmap
(
pMap
)
drag
.
setHotSpot
(
QPoint
(
pMap
.
width
()
/
2
,
pMap
.
height
()
/
2
))
drag
.
setHotSpot
(
QPoint
(
int
(
pMap
.
width
()
/
2
)
,
int
(
pMap
.
height
()
/
2
))
)
return
drag
...
...
src/genericdelegates.py
View file @
b647417e
...
...
@@ -64,7 +64,7 @@ class RichTextColumnDelegate(QStyledItemDelegate):
text
=
index
.
model
().
data
(
index
)
self
.
document
.
setDefaultFont
(
option
.
font
)
self
.
document
.
setHtml
(
text
)
return
QSize
(
self
.
document
.
idealWidth
()
+
5
,
return
QSize
(
int
(
self
.
document
.
idealWidth
()
)
+
5
,
option
.
fontMetrics
.
height
())
...
...
src/humanclient.py
View file @
b647417e
...
...
@@ -321,8 +321,8 @@ class ClientDialog(QDialog):
idx
if
vertical
else
0
,
idx
if
not
vertical
else
0
)
geometry
.
setWidth
(
width
)
geometry
.
setHeight
(
height
)
geometry
.
setWidth
(
int
(
width
)
)
geometry
.
setHeight
(
int
(
height
)
)
self
.
setGeometry
(
geometry
)
def
showEvent
(
self
,
dummyEvent
):
...
...
src/qtreactor.py
View file @
b647417e
...
...
@@ -250,7 +250,7 @@ class QtReactor(posixbase.PosixReactorBase):
timeout
=
0
else
:
timeout
=
self
.
timeout
()
self
.
_timer
.
setInterval
(
timeout
*
1000
)
self
.
_timer
.
setInterval
(
int
(
timeout
*
1000
)
)
self
.
_timer
.
start
()
def
runReturn
(
self
,
installSignalHandlers
=
True
):
...
...
src/uitile.py
View file @
b647417e
...
...
@@ -250,8 +250,8 @@ class UITile(AnimatedMixin, QGraphicsObject, StrMixin):
if
self
.
showFace
():
faceSize
=
self
.
tileset
.
faceSize
.
toSize
()
faceSize
=
QSize
(
faceSize
.
width
()
*
xScale
,
faceSize
.
height
()
*
yScale
)
int
(
faceSize
.
width
()
*
xScale
)
,
int
(
faceSize
.
height
()
*
yScale
)
)
painter
.
translate
(
self
.
facePos
())
renderer
.
render
(
painter
,
self
.
tileset
.
svgName
[
self
.
tile
.
exposed
],
QRectF
(
QPointF
(),
QSizeF
(
faceSize
)))
...
...
Antonio Rojas
@arojas
mentioned in commit
779521fa
·
Dec 18, 2021
mentioned in commit
779521fa
mentioned in commit 779521faa0c89b203bd05faf34398c99beafe834
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment