drop the glyph from the module button name

The glyph identifies a module on the layout grid, where it is drawn in the
cells the module occupies. On the selection button beside the module's name
it says nothing the name does not, so it goes -- and REQ-MOD-UI-DIALOG,
which asked for it, with it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ne3mejABZoLWKLh8fgpM3x
This commit is contained in:
2026-08-11 21:37:34 +02:00
parent 5998f9f190
commit e6f4b66232
2 changed files with 7 additions and 7 deletions

View File

@@ -518,9 +518,10 @@ ShipLayoutDialog::ShipLayoutDialog(const GameConfig* config,
m_moduleButtons.push_back(nullptr);
continue;
}
// The module's name and glyph over what it costs -- its materials and the
// production time it adds (REQ-MOD-UI-DIALOG). Both children are transparent to
// the mouse so a click anywhere on the face still reaches the button.
// The module's name over what it costs -- its materials and the production time
// it adds (REQ-MOD-UI-DIALOG). The glyph is how a module is identified on the
// layout grid, not here. Both children are transparent to the mouse so a click
// anywhere on the face still reaches the button.
OptionButton* btn = new OptionButton(this);
btn->setCheckable(true);
@@ -528,9 +529,8 @@ ShipLayoutDialog::ShipLayoutDialog(const GameConfig* config,
face->setContentsMargins(8, 4, 8, 4);
face->setSpacing(1);
QLabel* nameLabel = new QLabel(
QString::fromStdString(toDisplayName(def.id))
+ " " + QString::fromStdString(def.glyph), btn);
QLabel* nameLabel =
new QLabel(QString::fromStdString(toDisplayName(def.id)), btn);
nameLabel->setAttribute(Qt::WA_TransparentForMouseEvents, true);
face->addWidget(nameLabel);