Merge pull request #1381 from ZeldaZach/flags_to_lower
Country to lower (fix win bug)
This commit is contained in:
commit
18ec8e20b6
3 changed files with 2 additions and 4 deletions
|
@ -62,9 +62,7 @@ DlgRegister::DlgRegister(QWidget *parent)
|
||||||
countryEdit->setCurrentIndex(0);
|
countryEdit->setCurrentIndex(0);
|
||||||
QStringList countries = settingsCache->getCountries();
|
QStringList countries = settingsCache->getCountries();
|
||||||
foreach(QString c, countries)
|
foreach(QString c, countries)
|
||||||
{
|
|
||||||
countryEdit->addItem(QPixmap(":/resources/countries/" + c + ".svg"), c);
|
countryEdit->addItem(QPixmap(":/resources/countries/" + c + ".svg"), c);
|
||||||
}
|
|
||||||
|
|
||||||
realnameLabel = new QLabel(tr("Real name:"));
|
realnameLabel = new QLabel(tr("Real name:"));
|
||||||
realnameEdit = new QLineEdit();
|
realnameEdit = new QLineEdit();
|
||||||
|
|
|
@ -119,7 +119,7 @@ QPixmap CountryPixmapGenerator::generatePixmap(int height, const QString &countr
|
||||||
if (pmCache.contains(key))
|
if (pmCache.contains(key))
|
||||||
return pmCache.value(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());
|
int width = (int) round(height * (double) svg.defaultSize().width() / (double) svg.defaultSize().height());
|
||||||
QPixmap pixmap(width, height);
|
QPixmap pixmap(width, height);
|
||||||
pixmap.fill(Qt::transparent);
|
pixmap.fill(Qt::transparent);
|
||||||
|
|
Loading…
Reference in a new issue