add new setting to dlg

This commit is contained in:
RickyRister 2024-12-09 23:14:51 -08:00
parent c4287eea45
commit a5d3c52b8f
2 changed files with 10 additions and 0 deletions

View file

@ -495,11 +495,18 @@ UserInterfaceSettingsPage::UserInterfaceSettingsPage()
connect(&useTearOffMenusCheckBox, &QCheckBox::QT_STATE_CHANGED, &SettingsCache::instance(),
[](const QT_STATE_CHANGED_T state) { SettingsCache::instance().setUseTearOffMenus(state == Qt::Checked); });
cardViewInitialHeightBox.setRange(0, 9999);
cardViewInitialHeightBox.setValue(SettingsCache::instance().getCardViewInitialHeight());
connect(&cardViewInitialHeightBox, qOverload<int>(&QSpinBox::valueChanged), &SettingsCache::instance(),
&SettingsCache::setCardViewInitialHeight);
auto *generalGrid = new QGridLayout;
generalGrid->addWidget(&doubleClickToPlayCheckBox, 0, 0);
generalGrid->addWidget(&playToStackCheckBox, 1, 0);
generalGrid->addWidget(&annotateTokensCheckBox, 2, 0);
generalGrid->addWidget(&useTearOffMenusCheckBox, 3, 0);
generalGrid->addWidget(&cardViewInitialHeightLabel, 4, 0);
generalGrid->addWidget(&cardViewInitialHeightBox, 4, 1);
generalGroupBox = new QGroupBox;
generalGroupBox->setLayout(generalGrid);
@ -576,6 +583,7 @@ void UserInterfaceSettingsPage::retranslateUi()
playToStackCheckBox.setText(tr("&Play all nonlands onto the stack (not the battlefield) by default"));
annotateTokensCheckBox.setText(tr("Annotate card text on tokens"));
useTearOffMenusCheckBox.setText(tr("Use tear-off menus, allowing right click menus to persist on screen"));
cardViewInitialHeightLabel.setText(tr("Card view window maximum initial height:"));
notificationsGroupBox->setTitle(tr("Notifications settings"));
notificationsEnabledCheckBox.setText(tr("Enable notifications in taskbar"));
specNotificationsEnabledCheckBox.setText(tr("Notify in the taskbar for game events while you are spectating"));

View file

@ -126,6 +126,8 @@ private:
QCheckBox playToStackCheckBox;
QCheckBox annotateTokensCheckBox;
QCheckBox useTearOffMenusCheckBox;
QLabel cardViewInitialHeightLabel;
QSpinBox cardViewInitialHeightBox;
QCheckBox tapAnimationCheckBox;
QCheckBox openDeckInNewTabCheckBox;
QLabel rewindBufferingMsLabel;