Fix order of preferences saving page (#292)

This commit is contained in:
Jeremy Bullock 2020-10-03 22:33:45 -06:00 committed by GitHub
parent 1c25b6a785
commit 3dc407d284
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -360,15 +360,16 @@ void PreferencesPopup::onStyleSheetTypeChanged() {
if (iconThemeName != "dark") {
// QIcon::setThemeName(Preferences::instance()->getIconTheme() ? "dark"
// : "light");
DVGui::MsgBoxInPopup(DVGui::MsgType(INFORMATION), tr("Please restart to reload the icons."));
DVGui::MsgBoxInPopup(DVGui::MsgType(INFORMATION),
tr("Please restart to reload the icons."));
}
}
else {
} else {
m_pref->setValue(iconTheme, false);
if (iconThemeName != "light") {
// QIcon::setThemeName(Preferences::instance()->getIconTheme() ? "dark"
// : "light");
DVGui::MsgBoxInPopup(DVGui::MsgType(INFORMATION), tr("Please restart to reload the icons."));
DVGui::MsgBoxInPopup(DVGui::MsgType(INFORMATION),
tr("Please restart to reload the icons."));
}
}
}
@ -934,8 +935,8 @@ void PreferencesPopup::insertDualUIs(
//-----------------------------------------------------------------------------
void PreferencesPopup::insertFootNote(QGridLayout* layout) {
QLabel* note =
new QLabel(tr("* Changes will take effect the next time you run Tahoma2D"));
QLabel* note = new QLabel(
tr("* Changes will take effect the next time you run Tahoma2D"));
note->setStyleSheet("font-size: 10px; font: italic;");
layout->addWidget(note, layout->rowCount(), 0, 1, 2,
Qt::AlignLeft | Qt::AlignVCenter);
@ -1544,6 +1545,10 @@ QWidget* PreferencesPopup::createLoadingPage() {
//-----------------------------------------------------------------------------
QWidget* PreferencesPopup::createSavingPage() {
auto putLabel = [&](const QString& labelStr, QGridLayout* lay) {
lay->addWidget(new QLabel(labelStr, this), lay->rowCount(), 0, 1, 3,
Qt::AlignLeft | Qt::AlignVCenter);
};
QWidget* widget = new QWidget(this);
QGridLayout* lay = new QGridLayout();
setupLayout(lay);
@ -1556,12 +1561,10 @@ QWidget* PreferencesPopup::createSavingPage() {
insertUI(replaceAfterSaveLevelAs, lay);
QGridLayout* backupLay = insertGroupBoxUI(backupEnabled, lay);
{ insertUI(backupKeepCount, backupLay); }
QLabel* matteColorLabel =
new QLabel(tr("Matte color is used for background when overwriting "
putLabel(tr("Matte color is used for background when overwriting "
"raster levels with transparent pixels\nin non "
"alpha-enabled image format."),
this);
lay->addWidget(matteColorLabel, 0, 0, 1, 3, Qt::AlignLeft);
lay);
insertUI(rasterBackgroundColor, lay);
insertUI(resetUndoOnSavingLevel, lay);
insertUI(doNotShowPopupSaveScene, lay);
@ -1583,7 +1586,8 @@ QWidget* PreferencesPopup::createImportExportPage() {
QGridLayout* lay = new QGridLayout();
setupLayout(lay);
putLabel(tr("Tahoma2D can use FFmpeg for additional file formats.\n") +
putLabel(
tr("Tahoma2D can use FFmpeg for additional file formats.\n") +
tr("FFmpeg is bundled with Tahoma2D,\n") +
tr("but you can provide the path to a different ffmpeg location."),
lay);