prettify spoiler settings (#3180)
This commit is contained in:
parent
7758145e71
commit
0c10b66a2d
2 changed files with 9 additions and 5 deletions
|
@ -509,6 +509,7 @@ DeckEditorSettingsPage::DeckEditorSettingsPage()
|
||||||
connect(mpSpoilerPathButton, SIGNAL(clicked()), this, SLOT(spoilerPathButtonClicked()));
|
connect(mpSpoilerPathButton, SIGNAL(clicked()), this, SLOT(spoilerPathButtonClicked()));
|
||||||
|
|
||||||
updateNowButton = new QPushButton(tr("Update Spoilers"));
|
updateNowButton = new QPushButton(tr("Update Spoilers"));
|
||||||
|
updateNowButton->setFixedWidth(150);
|
||||||
connect(updateNowButton, SIGNAL(clicked()), this, SLOT(updateSpoilers()));
|
connect(updateNowButton, SIGNAL(clicked()), this, SLOT(updateSpoilers()));
|
||||||
|
|
||||||
// Update the GUI depending on if the box is ticked or not
|
// Update the GUI depending on if the box is ticked or not
|
||||||
|
@ -518,11 +519,12 @@ DeckEditorSettingsPage::DeckEditorSettingsPage()
|
||||||
lpGeneralGrid->addWidget(&mcGeneralMessageLabel, 0, 0);
|
lpGeneralGrid->addWidget(&mcGeneralMessageLabel, 0, 0);
|
||||||
|
|
||||||
lpSpoilerGrid->addWidget(&mcDownloadSpoilersCheckBox, 0, 0);
|
lpSpoilerGrid->addWidget(&mcDownloadSpoilersCheckBox, 0, 0);
|
||||||
lpSpoilerGrid->addWidget(updateNowButton, 0, 2);
|
|
||||||
lpSpoilerGrid->addWidget(&mcSpoilerSaveLabel, 1, 0);
|
lpSpoilerGrid->addWidget(&mcSpoilerSaveLabel, 1, 0);
|
||||||
lpSpoilerGrid->addWidget(mpSpoilerSavePathLineEdit, 1, 1);
|
lpSpoilerGrid->addWidget(mpSpoilerSavePathLineEdit, 1, 1);
|
||||||
lpSpoilerGrid->addWidget(mpSpoilerPathButton, 1, 2);
|
lpSpoilerGrid->addWidget(mpSpoilerPathButton, 1, 2);
|
||||||
lpSpoilerGrid->addWidget(&infoOnSpoilersLabel, 2, 0, 1, 3, Qt::AlignTop);
|
lpSpoilerGrid->addWidget(&lastUpdatedLabel, 2, 0);
|
||||||
|
lpSpoilerGrid->addWidget(updateNowButton, 2, 1);
|
||||||
|
lpSpoilerGrid->addWidget(&infoOnSpoilersLabel, 3, 0, 1, 3, Qt::AlignTop);
|
||||||
|
|
||||||
// On a change to the check box, hide/unhide the other fields
|
// On a change to the check box, hide/unhide the other fields
|
||||||
connect(&mcDownloadSpoilersCheckBox, SIGNAL(toggled(bool)), settingsCache, SLOT(setDownloadSpoilerStatus(bool)));
|
connect(&mcDownloadSpoilersCheckBox, SIGNAL(toggled(bool)), settingsCache, SLOT(setDownloadSpoilerStatus(bool)));
|
||||||
|
@ -590,6 +592,7 @@ void DeckEditorSettingsPage::setSpoilersEnabled(bool anInput)
|
||||||
mcSpoilerSaveLabel.setEnabled(anInput);
|
mcSpoilerSaveLabel.setEnabled(anInput);
|
||||||
mpSpoilerSavePathLineEdit->setEnabled(anInput);
|
mpSpoilerSavePathLineEdit->setEnabled(anInput);
|
||||||
mpSpoilerPathButton->setEnabled(anInput);
|
mpSpoilerPathButton->setEnabled(anInput);
|
||||||
|
lastUpdatedLabel.setEnabled(anInput);
|
||||||
updateNowButton->setEnabled(anInput);
|
updateNowButton->setEnabled(anInput);
|
||||||
infoOnSpoilersLabel.setEnabled(anInput);
|
infoOnSpoilersLabel.setEnabled(anInput);
|
||||||
|
|
||||||
|
@ -604,8 +607,8 @@ void DeckEditorSettingsPage::retranslateUi()
|
||||||
mcDownloadSpoilersCheckBox.setText(tr("Download Spoilers Automatically"));
|
mcDownloadSpoilersCheckBox.setText(tr("Download Spoilers Automatically"));
|
||||||
mcSpoilerSaveLabel.setText(tr("Spoiler Location:"));
|
mcSpoilerSaveLabel.setText(tr("Spoiler Location:"));
|
||||||
mcGeneralMessageLabel.setText(tr("Hey, something's here finally!"));
|
mcGeneralMessageLabel.setText(tr("Hey, something's here finally!"));
|
||||||
infoOnSpoilersLabel.setText(tr("Last Updated") + ": " + getLastUpdateTime() + "\n\n" +
|
lastUpdatedLabel.setText(tr("Last Updated") + ": " + getLastUpdateTime());
|
||||||
tr("Spoilers download automatically on launch") + "\n" +
|
infoOnSpoilersLabel.setText(tr("Spoilers download automatically on launch") + "\n" +
|
||||||
tr("Press the button to manually update without relaunching") + "\n\n" +
|
tr("Press the button to manually update without relaunching") + "\n\n" +
|
||||||
tr("Do not close settings until manual update complete"));
|
tr("Do not close settings until manual update complete"));
|
||||||
}
|
}
|
||||||
|
@ -1082,4 +1085,4 @@ void DlgSettings::retranslateUi()
|
||||||
dynamic_cast<AbstractSettingsPage *>(pagesWidget->widget(i))->retranslateUi();
|
dynamic_cast<AbstractSettingsPage *>(pagesWidget->widget(i))->retranslateUi();
|
||||||
|
|
||||||
contentsWidget->reset();
|
contentsWidget->reset();
|
||||||
}
|
}
|
||||||
|
|
|
@ -156,6 +156,7 @@ private:
|
||||||
QLineEdit *mpSpoilerSavePathLineEdit;
|
QLineEdit *mpSpoilerSavePathLineEdit;
|
||||||
QLabel mcSpoilerSaveLabel;
|
QLabel mcSpoilerSaveLabel;
|
||||||
QLabel mcGeneralMessageLabel;
|
QLabel mcGeneralMessageLabel;
|
||||||
|
QLabel lastUpdatedLabel;
|
||||||
QLabel infoOnSpoilersLabel;
|
QLabel infoOnSpoilersLabel;
|
||||||
QPushButton *mpSpoilerPathButton;
|
QPushButton *mpSpoilerPathButton;
|
||||||
QPushButton *updateNowButton;
|
QPushButton *updateNowButton;
|
||||||
|
|
Loading…
Reference in a new issue