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
18ec8e20
Commit
18ec8e20
authored
Aug 22, 2015
by
ctrlaltca
Browse files
Merge pull request #1381 from ZeldaZach/flags_to_lower
Country to lower (fix win bug)
parents
e9156ecd
41b10308
Changes
3
Hide whitespace changes
Inline
Side-by-side
cockatrice/src/dlg_edit_user.cpp
View file @
18ec8e20
...
...
@@ -35,7 +35,7 @@ DlgEditUser::DlgEditUser(QWidget *parent, QString email, int gender, QString cou
foreach
(
QString
c
,
countries
)
{
countryEdit
->
addItem
(
QPixmap
(
":/resources/countries/"
+
c
+
".svg"
),
c
);
if
(
c
==
country
)
if
(
c
==
country
)
countryEdit
->
setCurrentIndex
(
i
);
++
i
;
...
...
cockatrice/src/dlg_register.cpp
View file @
18ec8e20
...
...
@@ -62,9 +62,7 @@ DlgRegister::DlgRegister(QWidget *parent)
countryEdit
->
setCurrentIndex
(
0
);
QStringList
countries
=
settingsCache
->
getCountries
();
foreach
(
QString
c
,
countries
)
{
countryEdit
->
addItem
(
QPixmap
(
":/resources/countries/"
+
c
+
".svg"
),
c
);
}
realnameLabel
=
new
QLabel
(
tr
(
"Real name:"
));
realnameEdit
=
new
QLineEdit
();
...
...
cockatrice/src/pixmapgenerator.cpp
View file @
18ec8e20
...
...
@@ -119,7 +119,7 @@ QPixmap CountryPixmapGenerator::generatePixmap(int height, const QString &countr
if
(
pmCache
.
contains
(
key
))
return
pmCache
.
value
(
key
);
QSvgRenderer
svg
(
QString
(
":/resources/countries/"
+
countryCode
+
".svg"
));
QSvgRenderer
svg
(
QString
(
":/resources/countries/"
+
countryCode
.
toLower
()
+
".svg"
));
int
width
=
(
int
)
round
(
height
*
(
double
)
svg
.
defaultSize
().
width
()
/
(
double
)
svg
.
defaultSize
().
height
());
QPixmap
pixmap
(
width
,
height
);
pixmap
.
fill
(
Qt
::
transparent
);
...
...
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