add debug settings; option to show cardIds (#5404)

* add debug settings; option to show cardIds

* pass param by const ref

* change group structure again

* create debug.ini if not exists
This commit is contained in:
RickyRister 2025-01-01 21:32:58 -08:00 committed by GitHub
parent 62f60867a9
commit f924b04efd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 50 additions and 2 deletions

View file

@ -141,8 +141,13 @@ void AbstractCardItem::paintPicture(QPainter *painter, const QSizeF &translatedS
QString nameStr;
if (facedown)
nameStr = "# " + QString::number(id);
else
nameStr = name;
else {
QString prefix = "";
if (SettingsCache::instance().debug().getShowCardId()) {
prefix = "#" + QString::number(id) + " ";
}
nameStr = prefix + name;
}
painter->drawText(QRectF(3 * scaleFactor, 3 * scaleFactor, translatedSize.width() - 6 * scaleFactor,
translatedSize.height() - 6 * scaleFactor),
Qt::AlignTop | Qt::AlignLeft | Qt::TextWrapAnywhere, nameStr);