From 0225c0bc76e7cf2baf6f1ae2fa308560f3d2a734 Mon Sep 17 00:00:00 2001 From: RickyRister Date: Tue, 10 Dec 2024 00:23:23 -0800 Subject: [PATCH] move to appearance tab --- cockatrice/src/dialogs/dlg_settings.cpp | 16 ++++++++-------- cockatrice/src/dialogs/dlg_settings.h | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/cockatrice/src/dialogs/dlg_settings.cpp b/cockatrice/src/dialogs/dlg_settings.cpp index c5d93d934..c8db63a42 100644 --- a/cockatrice/src/dialogs/dlg_settings.cpp +++ b/cockatrice/src/dialogs/dlg_settings.cpp @@ -346,11 +346,18 @@ AppearanceSettingsPage::AppearanceSettingsPage() connect(&verticalCardOverlapPercentBox, SIGNAL(valueChanged(int)), &settings, SLOT(setStackCardOverlapPercent(int))); + cardViewInitialHeightBox.setRange(0, 9999); + cardViewInitialHeightBox.setValue(SettingsCache::instance().getCardViewInitialHeight()); + connect(&cardViewInitialHeightBox, qOverload(&QSpinBox::valueChanged), &SettingsCache::instance(), + &SettingsCache::setCardViewInitialHeight); + auto *cardsGrid = new QGridLayout; cardsGrid->addWidget(&displayCardNamesCheckBox, 0, 0, 1, 2); cardsGrid->addWidget(&cardScalingCheckBox, 1, 0, 1, 2); cardsGrid->addWidget(&verticalCardOverlapPercentLabel, 2, 0, 1, 1); cardsGrid->addWidget(&verticalCardOverlapPercentBox, 2, 1, 1, 1); + cardsGrid->addWidget(&cardViewInitialHeightLabel, 3, 0); + cardsGrid->addWidget(&cardViewInitialHeightBox, 3, 1); cardsGroupBox = new QGroupBox; cardsGroupBox->setLayout(cardsGrid); @@ -448,6 +455,7 @@ void AppearanceSettingsPage::retranslateUi() cardScalingCheckBox.setText(tr("Scale cards on mouse over")); verticalCardOverlapPercentLabel.setText( tr("Minimum overlap percentage of cards on the stack and in vertical hand")); + cardViewInitialHeightLabel.setText(tr("Card view window maximum initial height:")); handGroupBox->setTitle(tr("Hand layout")); horizontalHandCheckBox.setText(tr("Display hand horizontally (wastes space)")); @@ -495,18 +503,11 @@ 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(&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); @@ -583,7 +584,6 @@ 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")); diff --git a/cockatrice/src/dialogs/dlg_settings.h b/cockatrice/src/dialogs/dlg_settings.h index 53b060f1a..2984569d8 100644 --- a/cockatrice/src/dialogs/dlg_settings.h +++ b/cockatrice/src/dialogs/dlg_settings.h @@ -96,6 +96,8 @@ private: QCheckBox cardScalingCheckBox; QLabel verticalCardOverlapPercentLabel; QSpinBox verticalCardOverlapPercentBox; + QLabel cardViewInitialHeightLabel; + QSpinBox cardViewInitialHeightBox; QCheckBox horizontalHandCheckBox; QCheckBox leftJustifiedHandCheckBox; QCheckBox invertVerticalCoordinateCheckBox; @@ -126,8 +128,6 @@ private: QCheckBox playToStackCheckBox; QCheckBox annotateTokensCheckBox; QCheckBox useTearOffMenusCheckBox; - QLabel cardViewInitialHeightLabel; - QSpinBox cardViewInitialHeightBox; QCheckBox tapAnimationCheckBox; QCheckBox openDeckInNewTabCheckBox; QLabel rewindBufferingMsLabel;