mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-18 08:22:15 -07:00
Fixup some thangs.
This commit is contained in:
parent
07e22d9d27
commit
4f0b5dbc4a
4 changed files with 5 additions and 80 deletions
|
|
@ -40,70 +40,11 @@
|
||||||
<file>resources/icons/update.png</file>
|
<file>resources/icons/update.png</file>
|
||||||
<file>resources/icons/view.svg</file>
|
<file>resources/icons/view.svg</file>
|
||||||
|
|
||||||
<file>resources/icons/mana/0.svg</file>
|
|
||||||
<file>resources/icons/mana/1.svg</file>
|
|
||||||
<file>resources/icons/mana/2.svg</file>
|
|
||||||
<file>resources/icons/mana/3.svg</file>
|
|
||||||
<file>resources/icons/mana/4.svg</file>
|
|
||||||
<file>resources/icons/mana/5.svg</file>
|
|
||||||
<file>resources/icons/mana/6.svg</file>
|
|
||||||
<file>resources/icons/mana/7.svg</file>
|
|
||||||
<file>resources/icons/mana/8.svg</file>
|
|
||||||
<file>resources/icons/mana/9.svg</file>
|
|
||||||
<file>resources/icons/mana/10.svg</file>
|
|
||||||
<file>resources/icons/mana/11.svg</file>
|
|
||||||
<file>resources/icons/mana/12.svg</file>
|
|
||||||
<file>resources/icons/mana/13.svg</file>
|
|
||||||
<file>resources/icons/mana/14.svg</file>
|
|
||||||
<file>resources/icons/mana/15.svg</file>
|
|
||||||
<file>resources/icons/mana/16.svg</file>
|
|
||||||
<file>resources/icons/mana/17.svg</file>
|
|
||||||
<file>resources/icons/mana/18.svg</file>
|
|
||||||
<file>resources/icons/mana/19.svg</file>
|
|
||||||
<file>resources/icons/mana/20.svg</file>
|
|
||||||
<file>resources/icons/mana/2B.svg</file>
|
|
||||||
<file>resources/icons/mana/2G.svg</file>
|
|
||||||
<file>resources/icons/mana/2R.svg</file>
|
|
||||||
<file>resources/icons/mana/2U.svg</file>
|
|
||||||
<file>resources/icons/mana/2W.svg</file>
|
|
||||||
<file>resources/icons/mana/B.svg</file>
|
<file>resources/icons/mana/B.svg</file>
|
||||||
<file>resources/icons/mana/BG.svg</file>
|
|
||||||
<file>resources/icons/mana/BGP.svg</file>
|
|
||||||
<file>resources/icons/mana/BP.svg</file>
|
|
||||||
<file>resources/icons/mana/BR.svg</file>
|
|
||||||
<file>resources/icons/mana/BRP.svg</file>
|
|
||||||
<file>resources/icons/mana/C.svg</file>
|
|
||||||
<file>resources/icons/mana/CB.svg</file>
|
|
||||||
<file>resources/icons/mana/CG.svg</file>
|
|
||||||
<file>resources/icons/mana/CR.svg</file>
|
|
||||||
<file>resources/icons/mana/CU.svg</file>
|
|
||||||
<file>resources/icons/mana/CW.svg</file>
|
|
||||||
<file>resources/icons/mana/G.svg</file>
|
<file>resources/icons/mana/G.svg</file>
|
||||||
<file>resources/icons/mana/GP.svg</file>
|
|
||||||
<file>resources/icons/mana/GU.svg</file>
|
|
||||||
<file>resources/icons/mana/GUP.svg</file>
|
|
||||||
<file>resources/icons/mana/GW.svg</file>
|
|
||||||
<file>resources/icons/mana/GWP.svg</file>
|
|
||||||
<file>resources/icons/mana/R.svg</file>
|
<file>resources/icons/mana/R.svg</file>
|
||||||
<file>resources/icons/mana/RG.svg</file>
|
|
||||||
<file>resources/icons/mana/RGP.svg</file>
|
|
||||||
<file>resources/icons/mana/RP.svg</file>
|
|
||||||
<file>resources/icons/mana/RW.svg</file>
|
|
||||||
<file>resources/icons/mana/RWP.svg</file>
|
|
||||||
<file>resources/icons/mana/S.svg</file>
|
|
||||||
<file>resources/icons/mana/U.svg</file>
|
<file>resources/icons/mana/U.svg</file>
|
||||||
<file>resources/icons/mana/UB.svg</file>
|
|
||||||
<file>resources/icons/mana/UBP.svg</file>
|
|
||||||
<file>resources/icons/mana/UP.svg</file>
|
|
||||||
<file>resources/icons/mana/UR.svg</file>
|
|
||||||
<file>resources/icons/mana/URP.svg</file>
|
|
||||||
<file>resources/icons/mana/W.svg</file>
|
<file>resources/icons/mana/W.svg</file>
|
||||||
<file>resources/icons/mana/WB.svg</file>
|
|
||||||
<file>resources/icons/mana/WBP.svg</file>
|
|
||||||
<file>resources/icons/mana/WP.svg</file>
|
|
||||||
<file>resources/icons/mana/WU.svg</file>
|
|
||||||
<file>resources/icons/mana/WUP.svg</file>
|
|
||||||
<file>resources/icons/mana/X.svg</file>
|
|
||||||
|
|
||||||
<file>resources/config/general.svg</file>
|
<file>resources/config/general.svg</file>
|
||||||
<file>resources/config/appearance.svg</file>
|
<file>resources/config/appearance.svg</file>
|
||||||
|
|
|
||||||
|
|
@ -27,9 +27,6 @@ ManaCostWidget::ManaCostWidget(QWidget *parent, CardInfoPtr _card) : QWidget(par
|
||||||
layout->addWidget(manaSymbol);
|
layout->addWidget(manaSymbol);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set minimum width based on number of icons
|
|
||||||
// setMinimumWidth(symbols.size() * 50 + (symbols.size() - 1) * 5);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ManaCostWidget::resizeEvent(QResizeEvent *event)
|
void ManaCostWidget::resizeEvent(QResizeEvent *event)
|
||||||
|
|
|
||||||
|
|
@ -48,22 +48,10 @@ void ManaSymbolWidget::resizeEvent(QResizeEvent *event)
|
||||||
|
|
||||||
void ManaSymbolWidget::loadManaIcon()
|
void ManaSymbolWidget::loadManaIcon()
|
||||||
{
|
{
|
||||||
qDebug() << "Symbol: " << symbol;
|
|
||||||
QString filename = "theme:icons/mana/";
|
QString filename = "theme:icons/mana/";
|
||||||
|
|
||||||
if (symbol == "W" || symbol == "U" || symbol == "B" || symbol == "R" || symbol == "G" || symbol == "C" ||
|
if (symbol == "W" || symbol == "U" || symbol == "B" || symbol == "R" || symbol == "G") {
|
||||||
symbol == "S" || symbol == "X") {
|
|
||||||
filename += symbol + ".svg";
|
filename += symbol + ".svg";
|
||||||
} else if (symbol.toInt() >= 0 && symbol.toInt() <= 20) {
|
|
||||||
filename += symbol + ".svg"; // Handle generic mana costs
|
|
||||||
qDebug() << "ManaIcon: " << filename;
|
|
||||||
} else if (symbol.contains('/')) {
|
|
||||||
QString cleanSymbol = symbol;
|
|
||||||
cleanSymbol.remove('{').remove('}').remove('/'); // Clean up hybrid & Phyrexian mana
|
|
||||||
filename += cleanSymbol + ".svg";
|
|
||||||
} else {
|
|
||||||
qDebug() << "ManaIcon: " << symbol << " was not a number.";
|
|
||||||
filename += symbol + ".svg"; // Fallback
|
|
||||||
}
|
}
|
||||||
|
|
||||||
manaIcon = QPixmap(filename);
|
manaIcon = QPixmap(filename);
|
||||||
|
|
|
||||||
|
|
@ -15,17 +15,16 @@ DeckPreviewColorIdentityFilterWidget::DeckPreviewColorIdentityFilterWidget(Visua
|
||||||
|
|
||||||
QString fullColorIdentity = "WUBRG";
|
QString fullColorIdentity = "WUBRG";
|
||||||
for (const QChar &color : fullColorIdentity) {
|
for (const QChar &color : fullColorIdentity) {
|
||||||
// auto *circle = new DeckPreviewColorIdentityFilterCircleWidget(color, this);
|
auto *manaSymbol = new ManaSymbolWidget(this, color, false, true);
|
||||||
auto *circle = new ManaSymbolWidget(this, color, false, true);
|
manaSymbol->setMaximumWidth(25);
|
||||||
circle->setMaximumWidth(25);
|
|
||||||
|
|
||||||
layout->addWidget(circle);
|
layout->addWidget(manaSymbol);
|
||||||
|
|
||||||
// Initialize the activeColors map
|
// Initialize the activeColors map
|
||||||
activeColors[color] = false;
|
activeColors[color] = false;
|
||||||
|
|
||||||
// Connect the color toggled signal
|
// Connect the color toggled signal
|
||||||
connect(circle, &ManaSymbolWidget::colorToggled, this,
|
connect(manaSymbol, &ManaSymbolWidget::colorToggled, this,
|
||||||
&DeckPreviewColorIdentityFilterWidget::handleColorToggled);
|
&DeckPreviewColorIdentityFilterWidget::handleColorToggled);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue