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
3d3a44e9
Commit
3d3a44e9
authored
Apr 05, 2021
by
Wolfgang Rohdewald
Browse files
UITile.pixmapFromSvg: rename wantSize to originalSize
parent
109d9508
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/uitile.py
View file @
3d3a44e9
...
...
@@ -211,11 +211,11 @@ class UITile(AnimatedMixin, QGraphicsObject, StrMixin):
if
withBorders
is
None
:
withBorders
=
Internal
.
Preferences
.
showShadows
if
withBorders
:
want
Size
=
self
.
tileset
.
tileSize
.
toSize
()
original
Size
=
self
.
tileset
.
tileSize
.
toSize
()
else
:
want
Size
=
self
.
tileset
.
faceSize
.
toSize
()
original
Size
=
self
.
tileset
.
faceSize
.
toSize
()
if
not
pmapSize
:
pmapSize
=
want
Size
pmapSize
=
original
Size
result
=
QPixmap
(
pmapSize
)
result
.
fill
(
Qt
.
transparent
)
painter
=
QPainter
(
result
)
...
...
@@ -224,8 +224,8 @@ class UITile(AnimatedMixin, QGraphicsObject, StrMixin):
'painter is not active. Wanted size: %s'
%
str
(
pmapSize
))
try
:
xScale
=
float
(
pmapSize
.
width
())
/
want
Size
.
width
()
yScale
=
float
(
pmapSize
.
height
())
/
want
Size
.
height
()
xScale
=
float
(
pmapSize
.
width
())
/
original
Size
.
width
()
yScale
=
float
(
pmapSize
.
height
())
/
original
Size
.
height
()
except
ZeroDivisionError
:
xScale
=
1
yScale
=
1
...
...
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