From 6b39f24484bb0796f3f383401f95904f85b74d7b Mon Sep 17 00:00:00 2001 From: "Felix \"xq\" Queißner" Date: Sat, 20 Nov 2021 15:16:34 +0100 Subject: Implements #245 --- src/dialogs/settingsdialog.cpp | 15 ++++++ src/dialogs/settingsdialog.hpp | 4 ++ src/dialogs/settingsdialog.ui | 108 ++++++++++++++++++++++++++++++----------- 3 files changed, 100 insertions(+), 27 deletions(-) (limited to 'src/dialogs') diff --git a/src/dialogs/settingsdialog.cpp b/src/dialogs/settingsdialog.cpp index 19b0fd9..4921d50 100644 --- a/src/dialogs/settingsdialog.cpp +++ b/src/dialogs/settingsdialog.cpp @@ -396,6 +396,9 @@ void SettingsDialog::setOptions(const GenericSettings &options) break; } } + + this->ui->tab_keep_window->setChecked(!this->current_options.close_window_with_last_tab); + this->ui->tab_close_window->setChecked(this->current_options.close_window_with_last_tab); } std::optional SettingsDialog::locale() const @@ -1032,3 +1035,15 @@ void SettingsDialog::on_selected_language_currentIndexChanged(int index) kristall::globals().localization->translate(QLocale(language_id)); } + +void SettingsDialog::on_tab_keep_window_clicked() +{ + this->current_options.close_window_with_last_tab = false; +} + + +void SettingsDialog::on_tab_close_window_clicked() +{ + this->current_options.close_window_with_last_tab = true; +} + diff --git a/src/dialogs/settingsdialog.hpp b/src/dialogs/settingsdialog.hpp index 9176cea..59b4496 100644 --- a/src/dialogs/settingsdialog.hpp +++ b/src/dialogs/settingsdialog.hpp @@ -184,6 +184,10 @@ private slots: void on_selected_language_currentIndexChanged(int index); + void on_tab_keep_window_clicked(); + + void on_tab_close_window_clicked(); + private: void reloadStylePreview(); diff --git a/src/dialogs/settingsdialog.ui b/src/dialogs/settingsdialog.ui index 45d9787..f8c3510 100644 --- a/src/dialogs/settingsdialog.ui +++ b/src/dialogs/settingsdialog.ui @@ -276,6 +276,37 @@ + + + + Tab close behaviour + + + + + + + + + Keep window open + + + buttonGroup_10 + + + + + + + Close window + + + buttonGroup_10 + + + + + @@ -698,7 +729,8 @@ Set color... - + + .. @@ -736,7 +768,8 @@ Set font... - + + .. @@ -746,7 +779,8 @@ Set color... - + + .. @@ -777,7 +811,8 @@ Set font... - + + .. @@ -787,7 +822,8 @@ Set color... - + + .. @@ -818,7 +854,8 @@ Set font... - + + .. @@ -828,7 +865,8 @@ Set color... - + + .. @@ -859,7 +897,8 @@ Set font... - + + .. @@ -869,7 +908,8 @@ Set color... - + + .. @@ -906,7 +946,8 @@ Set font... - + + .. @@ -916,7 +957,8 @@ Set color... - + + .. @@ -953,7 +995,8 @@ Set font... - + + .. @@ -963,7 +1006,8 @@ Set color... - + + .. @@ -1036,7 +1080,8 @@ Set color... - + + .. @@ -1060,7 +1105,8 @@ Set color... - + + .. @@ -1084,7 +1130,8 @@ Set color... - + + .. @@ -1394,7 +1441,8 @@ Set color... - + + .. @@ -1430,7 +1478,8 @@ New - + + .. @@ -1443,7 +1492,8 @@ Save - + + .. @@ -1456,7 +1506,8 @@ Load - + + .. @@ -1472,7 +1523,8 @@ Import - + + .. @@ -1485,7 +1537,8 @@ Export - + + .. @@ -1661,14 +1714,15 @@ - - + - - + - + + + + -- cgit v1.2.3