i18n: strings for the default window size option

This commit is contained in:
Gary Wang 2022-04-13 00:03:37 +08:00
parent d645c0f3be
commit b5d723017a
No known key found for this signature in database
GPG Key ID: 5D30A4F15EA78760

View File

@ -29,10 +29,9 @@ SettingsDialog::SettingsDialog(QWidget *parent)
{ Settings::MouseWheelBehavior::Switch, tr("View next or previous item") }
};
// TODO: copywriting
static QList< QPair<Settings::WindowSizeBehavior, QString> > _iws_options {
{ Settings::WindowSizeBehavior::Auto, "Auto size" },
{ Settings::WindowSizeBehavior::Maximized, "Maximize" }
{ Settings::WindowSizeBehavior::Auto, tr("Auto size") },
{ Settings::WindowSizeBehavior::Maximized, tr("Maximized") }
};
QStringList dcbDropDown;
@ -53,8 +52,7 @@ SettingsDialog::SettingsDialog(QWidget *parent)
settingsForm->addRow(tr("Stay on top when start-up"), m_stayOnTop);
settingsForm->addRow(tr("Double-click behavior"), m_doubleClickBehavior);
settingsForm->addRow(tr("Mouse wheel behavior"), m_mouseWheelBehavior);
// TODO: copywriting
// settingsForm->addRow("Init window size behavior", m_initWindowSizeBehavior);
settingsForm->addRow(tr("Default window size"), m_initWindowSizeBehavior);
m_stayOnTop->setChecked(Settings::instance()->stayOnTop());
m_doubleClickBehavior->setModel(new QStringListModel(dcbDropDown));
@ -83,7 +81,7 @@ SettingsDialog::SettingsDialog(QWidget *parent)
Settings::instance()->setInitWindowSizeBehavior(_iws_options.at(index).first);
});
this->setMinimumSize(300, 90); // not sure why it complain "Unable to set geometry"
this->setMinimumSize(300, 120); // not sure why it complain "Unable to set geometry"
setWindowFlag(Qt::WindowContextHelpButtonHint, false);
}