Fix subtype tally alignment by using grid layout instead of character padding

This commit is contained in:
DawnFire42 2026-06-04 20:29:28 -04:00
parent 3c2a59ce6e
commit 74381b5c06
No known key found for this signature in database
GPG key ID: 24BB855EE2911B33
5 changed files with 74 additions and 73 deletions

View file

@ -10,8 +10,10 @@
#include <QGraphicsView>
class GameScene;
class QGridLayout;
class QLabel;
class QRubberBand;
struct SubtypeEntry;
class GameView : public QGraphicsView
{
@ -21,11 +23,12 @@ private:
QRubberBand *rubberBand;
QLabel *dragCountLabel;
QLabel *totalCountLabel;
QLabel *subtypeCountLabel; ///< Label displaying subtype breakdown for selected cards
QWidget *subtypeCountContainer; ///< Container widget for subtype tally display
QGridLayout *subtypeCountLayout; ///< Grid layout for subtype name/count pairs
QPointF selectionOrigin;
/** @brief Builds formatted text showing subtype tally for all selected cards */
QString buildSubtypeTallyText() const;
void rebuildSubtypeLabels(const QList<SubtypeEntry> &entries);
void clearSubtypeLabels();
protected:
void resizeEvent(QResizeEvent *event) override;