Commit 18ec8e20 authored by ctrlaltca's avatar ctrlaltca
Browse files

Merge pull request #1381 from ZeldaZach/flags_to_lower

Country to lower (fix win bug)
parents e9156ecd 41b10308
......@@ -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;
......
......@@ -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();
......
......@@ -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);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment