mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-01 11:03:54 -07:00
Fix subtype tally alignment by using grid layout instead of character padding
This commit is contained in:
parent
3c2a59ce6e
commit
74381b5c06
5 changed files with 74 additions and 73 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue