Merge pull request #1471 from ctrlaltca/deckeditor_theme_cardback

get cardback image from theme
This commit is contained in:
woogerboy21 2015-09-06 08:25:48 -04:00
commit dd4900b038

View file

@ -7,7 +7,6 @@
#include <QDirIterator>
#include <QFile>
#include <QTextStream>
#include <QSvgRenderer>
#include <QPainter>
#include <QUrl>
#include <QSet>
@ -657,11 +656,7 @@ void CardInfo::getPixmap(QSize size, QPixmap &pixmap)
loadPixmap(bigPixmap);
if (bigPixmap.isNull()) {
if (getName().isEmpty()) {
QSvgRenderer svg(QString("theme:back.svg"));
bigPixmap = QPixmap(svg.defaultSize());
bigPixmap.fill(Qt::transparent);
QPainter painter(&bigPixmap);
svg.render(&painter);
pixmap = themeManager->getCardBackPixmap();
} else {
pixmap = QPixmap(); // null
return;