feat(ui): remember mod download dialog's geometry
Makes it consistent with other modal dialogs. Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
parent
6aaf1f4f21
commit
7a95314e42
@ -680,6 +680,8 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv)
|
||||
|
||||
m_settings->registerSetting("UpdateDialogGeometry", "");
|
||||
|
||||
m_settings->registerSetting("ModDownloadGeometry", "");
|
||||
|
||||
// HACK: This code feels so stupid is there a less stupid way of doing this?
|
||||
{
|
||||
m_settings->registerSetting("PastebinURL", "");
|
||||
|
@ -81,6 +81,8 @@ ModDownloadDialog::ModDownloadDialog(const std::shared_ptr<ModFolderModel>& mods
|
||||
QMetaObject::connectSlotsByName(this);
|
||||
setWindowModality(Qt::WindowModal);
|
||||
setWindowTitle(dialogTitle());
|
||||
|
||||
restoreGeometry(QByteArray::fromBase64(APPLICATION->settings()->get("ModDownloadGeometry").toByteArray()));
|
||||
}
|
||||
|
||||
QString ModDownloadDialog::dialogTitle()
|
||||
@ -90,6 +92,7 @@ QString ModDownloadDialog::dialogTitle()
|
||||
|
||||
void ModDownloadDialog::reject()
|
||||
{
|
||||
APPLICATION->settings()->set("ModDownloadGeometry", saveGeometry().toBase64());
|
||||
QDialog::reject();
|
||||
}
|
||||
|
||||
@ -116,6 +119,7 @@ void ModDownloadDialog::confirm()
|
||||
|
||||
void ModDownloadDialog::accept()
|
||||
{
|
||||
APPLICATION->settings()->set("ModDownloadGeometry", saveGeometry().toBase64());
|
||||
QDialog::accept();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user