mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-11 00:24:47 -07:00
[VDE] Make sample hand widget look nicer (#6525)
This commit is contained in:
parent
154b9ace92
commit
1b71519ec6
2 changed files with 9 additions and 4 deletions
|
|
@ -22,6 +22,7 @@ DrawProbabilityWidget::DrawProbabilityWidget(QWidget *parent, DeckListStatistics
|
|||
{
|
||||
controls = new QWidget(this);
|
||||
controlLayout = new QHBoxLayout(controls);
|
||||
controlLayout->setContentsMargins(11, 0, 11, 0);
|
||||
|
||||
labelPrefix = new QLabel(this);
|
||||
controlLayout->addWidget(labelPrefix);
|
||||
|
|
@ -65,6 +66,7 @@ DrawProbabilityWidget::DrawProbabilityWidget(QWidget *parent, DeckListStatistics
|
|||
resultTable = new QTableWidget(this);
|
||||
resultTable->setColumnCount(3);
|
||||
resultTable->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch);
|
||||
resultTable->setEditTriggers(QAbstractItemView::NoEditTriggers);
|
||||
layout->addWidget(resultTable);
|
||||
|
||||
// Connections
|
||||
|
|
|
|||
|
|
@ -15,10 +15,13 @@ VisualDeckEditorSampleHandWidget::VisualDeckEditorSampleHandWidget(QWidget *pare
|
|||
: QWidget(parent), deckListModel(_deckListModel), statsAnalyzer(_statsAnalyzer)
|
||||
{
|
||||
layout = new QVBoxLayout(this);
|
||||
layout->setSpacing(0);
|
||||
setLayout(layout);
|
||||
|
||||
resetAndHandSizeContainerWidget = new QWidget(this);
|
||||
resetAndHandSizeLayout = new QHBoxLayout(resetAndHandSizeContainerWidget);
|
||||
resetAndHandSizeLayout->setContentsMargins(11, 0, 11, 0);
|
||||
|
||||
resetAndHandSizeContainerWidget = new QWidget(this);
|
||||
resetAndHandSizeContainerWidget->setLayout(resetAndHandSizeLayout);
|
||||
|
||||
resetButton = new QPushButton(this);
|
||||
|
|
@ -39,12 +42,12 @@ VisualDeckEditorSampleHandWidget::VisualDeckEditorSampleHandWidget(QWidget *pare
|
|||
flowWidget = new FlowWidget(this, Qt::Horizontal, Qt::ScrollBarAlwaysOff, Qt::ScrollBarAsNeeded);
|
||||
layout->addWidget(flowWidget);
|
||||
|
||||
drawProbabilityWidget = new DrawProbabilityWidget(this, statsAnalyzer);
|
||||
layout->addWidget(drawProbabilityWidget);
|
||||
|
||||
cardSizeWidget = new CardSizeWidget(this, flowWidget);
|
||||
layout->addWidget(cardSizeWidget);
|
||||
|
||||
drawProbabilityWidget = new DrawProbabilityWidget(this, statsAnalyzer);
|
||||
layout->addWidget(drawProbabilityWidget);
|
||||
|
||||
for (const ExactCard &card : getRandomCards(handSizeSpinBox->value())) {
|
||||
auto displayWidget = new CardInfoPictureWidget(this);
|
||||
displayWidget->setCard(card);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue