mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
get cardback image from theme
This commit is contained in:
parent
15e8121cf2
commit
e50d0c6db2
1 changed files with 1 additions and 6 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue