mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-04 04:23:55 -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);
|
controls = new QWidget(this);
|
||||||
controlLayout = new QHBoxLayout(controls);
|
controlLayout = new QHBoxLayout(controls);
|
||||||
|
controlLayout->setContentsMargins(11, 0, 11, 0);
|
||||||
|
|
||||||
labelPrefix = new QLabel(this);
|
labelPrefix = new QLabel(this);
|
||||||
controlLayout->addWidget(labelPrefix);
|
controlLayout->addWidget(labelPrefix);
|
||||||
|
|
@ -65,6 +66,7 @@ DrawProbabilityWidget::DrawProbabilityWidget(QWidget *parent, DeckListStatistics
|
||||||
resultTable = new QTableWidget(this);
|
resultTable = new QTableWidget(this);
|
||||||
resultTable->setColumnCount(3);
|
resultTable->setColumnCount(3);
|
||||||
resultTable->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch);
|
resultTable->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch);
|
||||||
|
resultTable->setEditTriggers(QAbstractItemView::NoEditTriggers);
|
||||||
layout->addWidget(resultTable);
|
layout->addWidget(resultTable);
|
||||||
|
|
||||||
// Connections
|
// Connections
|
||||||
|
|
|
||||||
|
|
@ -15,10 +15,13 @@ VisualDeckEditorSampleHandWidget::VisualDeckEditorSampleHandWidget(QWidget *pare
|
||||||
: QWidget(parent), deckListModel(_deckListModel), statsAnalyzer(_statsAnalyzer)
|
: QWidget(parent), deckListModel(_deckListModel), statsAnalyzer(_statsAnalyzer)
|
||||||
{
|
{
|
||||||
layout = new QVBoxLayout(this);
|
layout = new QVBoxLayout(this);
|
||||||
|
layout->setSpacing(0);
|
||||||
setLayout(layout);
|
setLayout(layout);
|
||||||
|
|
||||||
resetAndHandSizeContainerWidget = new QWidget(this);
|
|
||||||
resetAndHandSizeLayout = new QHBoxLayout(resetAndHandSizeContainerWidget);
|
resetAndHandSizeLayout = new QHBoxLayout(resetAndHandSizeContainerWidget);
|
||||||
|
resetAndHandSizeLayout->setContentsMargins(11, 0, 11, 0);
|
||||||
|
|
||||||
|
resetAndHandSizeContainerWidget = new QWidget(this);
|
||||||
resetAndHandSizeContainerWidget->setLayout(resetAndHandSizeLayout);
|
resetAndHandSizeContainerWidget->setLayout(resetAndHandSizeLayout);
|
||||||
|
|
||||||
resetButton = new QPushButton(this);
|
resetButton = new QPushButton(this);
|
||||||
|
|
@ -39,12 +42,12 @@ VisualDeckEditorSampleHandWidget::VisualDeckEditorSampleHandWidget(QWidget *pare
|
||||||
flowWidget = new FlowWidget(this, Qt::Horizontal, Qt::ScrollBarAlwaysOff, Qt::ScrollBarAsNeeded);
|
flowWidget = new FlowWidget(this, Qt::Horizontal, Qt::ScrollBarAlwaysOff, Qt::ScrollBarAsNeeded);
|
||||||
layout->addWidget(flowWidget);
|
layout->addWidget(flowWidget);
|
||||||
|
|
||||||
drawProbabilityWidget = new DrawProbabilityWidget(this, statsAnalyzer);
|
|
||||||
layout->addWidget(drawProbabilityWidget);
|
|
||||||
|
|
||||||
cardSizeWidget = new CardSizeWidget(this, flowWidget);
|
cardSizeWidget = new CardSizeWidget(this, flowWidget);
|
||||||
layout->addWidget(cardSizeWidget);
|
layout->addWidget(cardSizeWidget);
|
||||||
|
|
||||||
|
drawProbabilityWidget = new DrawProbabilityWidget(this, statsAnalyzer);
|
||||||
|
layout->addWidget(drawProbabilityWidget);
|
||||||
|
|
||||||
for (const ExactCard &card : getRandomCards(handSizeSpinBox->value())) {
|
for (const ExactCard &card : getRandomCards(handSizeSpinBox->value())) {
|
||||||
auto displayWidget = new CardInfoPictureWidget(this);
|
auto displayWidget = new CardInfoPictureWidget(this);
|
||||||
displayWidget->setCard(card);
|
displayWidget->setCard(card);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue