mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-05 09:33:25 -08:00
[Tournament] Fold tournament settings hint into the spinbox tooltip
The standalone hint label sat in the form layout's field column with an empty label cell, which misaligned it against the row above. Per review, drop the label and carry its text in the spinbox tooltip instead.
This commit is contained in:
parent
ef13df2bd2
commit
78df587e43
1 changed files with 1 additions and 6 deletions
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
#include <QDialogButtonBox>
|
#include <QDialogButtonBox>
|
||||||
#include <QFormLayout>
|
#include <QFormLayout>
|
||||||
#include <QLabel>
|
|
||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
#include <QSpinBox>
|
#include <QSpinBox>
|
||||||
|
|
||||||
|
|
@ -15,13 +14,9 @@ DlgTournamentSettings::DlgTournamentSettings(QWidget *parent) : QDialog(parent)
|
||||||
gamesPerMatchSpin = new QSpinBox(this);
|
gamesPerMatchSpin = new QSpinBox(this);
|
||||||
gamesPerMatchSpin->setRange(1, 5);
|
gamesPerMatchSpin->setRange(1, 5);
|
||||||
gamesPerMatchSpin->setValue(1);
|
gamesPerMatchSpin->setValue(1);
|
||||||
gamesPerMatchSpin->setToolTip(tr("Number of games per match (e.g., 3 for Best of 3)"));
|
gamesPerMatchSpin->setToolTip(tr("Number of games per match (e.g., 3 for Best of 3, 5 for Best of 5)"));
|
||||||
mainLayout->addRow(tr("Games per match:"), gamesPerMatchSpin);
|
mainLayout->addRow(tr("Games per match:"), gamesPerMatchSpin);
|
||||||
|
|
||||||
QLabel *hintLabel = new QLabel(tr("Set to 3 for Best of 3, 5 for Best of 5, etc."), this);
|
|
||||||
hintLabel->setStyleSheet("color: palette(placeholderText);");
|
|
||||||
mainLayout->addRow(QString(), hintLabel);
|
|
||||||
|
|
||||||
buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this);
|
buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this);
|
||||||
connect(buttonBox, &QDialogButtonBox::accepted, this, &DlgTournamentSettings::actOK);
|
connect(buttonBox, &QDialogButtonBox::accepted, this, &DlgTournamentSettings::actOK);
|
||||||
connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject);
|
connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue