Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Donald Haase
Cockatrice
Commits
28df389e
Commit
28df389e
authored
Sep 13, 2015
by
Fabio Bas
Browse files
Fixed flags size: they're not squared
parent
dfe97196
Changes
1
Hide whitespace changes
Inline
Side-by-side
cockatrice/src/pixmapgenerator.cpp
View file @
28df389e
...
...
@@ -104,11 +104,12 @@ QPixmap CountryPixmapGenerator::generatePixmap(int height, const QString &countr
if
(
pmCache
.
contains
(
key
))
return
pmCache
.
value
(
key
);
QPixmap
pixmap
=
QPixmap
(
"theme:countries/"
+
countryCode
.
toLower
()).
scaled
(
height
,
height
,
Qt
::
KeepAspectRatio
,
Qt
::
SmoothTransformation
);
int
width
=
height
*
2
;
QPixmap
pixmap
=
QPixmap
(
"theme:countries/"
+
countryCode
.
toLower
()).
scaled
(
width
,
height
,
Qt
::
KeepAspectRatio
,
Qt
::
SmoothTransformation
);
QPainter
painter
(
&
pixmap
);
painter
.
setPen
(
Qt
::
black
);
painter
.
drawRect
(
0
,
0
,
height
-
1
,
height
-
1
);
painter
.
drawRect
(
0
,
0
,
pixmap
.
width
()
-
1
,
pixmap
.
height
()
-
1
);
pmCache
.
insert
(
key
,
pixmap
);
return
pixmap
;
...
...
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