make the build hotkey badge legible

The shift glyph U+21E7 was not covered by the UI font and rendered as an
unrecognizable substitute, and the badge sat two points below the button font,
which made it hard to read even where the glyph was fine. Use U+2191, a plain
single-stroke arrow the standard fonts do carry, and draw the badge at the full
button font in bold. It stays dimmed, so it still reads as secondary to the cost.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JcReq7hVk4KUPhTDKWAG7K
This commit is contained in:
2026-08-06 08:27:00 +02:00
parent 8f6815f414
commit af410ee4de
3 changed files with 9 additions and 13 deletions

View File

@@ -56,8 +56,10 @@ QString InputMapper::getBuildHotkeyLabel(BuildingType type)
// Searched out of the binding table above rather than spelled out a second time,
// so a badge can never claim a key the handler does not act on. The shift glyph
// is written as a code point because the sources are not guaranteed to be read
// as UTF-8 by every compiler this builds with.
const QChar shiftGlyph(0x21E7); // U+21E7 UPWARDS WHITE ARROW
// as UTF-8 by every compiler this builds with. A plain stroke arrow rather than
// U+21E7 UPWARDS WHITE ARROW: the standard UI fonts do not all carry the outlined
// shift glyph, and the substitute they fall back to is unreadable at badge size.
const QChar shiftGlyph(0x2191); // U+2191 UPWARDS ARROW
for (int digit = 1; digit <= 9; ++digit)
{
if (buildHotkeyType(digit, false) == type)