GUI: Fix welcome_dialog dereference

This commit is contained in:
Elad 2024-11-02 08:55:58 +02:00
parent 85d1649696
commit 695799c39a

View File

@ -160,9 +160,17 @@ bool gui_application::Init()
if (m_gui_settings->GetValue(gui::ib_show_welcome).toBool())
{
welcome_dialog* welcome = new welcome_dialog(m_gui_settings, false);
bool use_dark_theme = false;
connect(welcome, &QDialog::accepted, this, [&]()
{
use_dark_theme = welcome->does_user_want_dark_theme();
});
welcome->exec();
if (welcome->does_user_want_dark_theme())
if (use_dark_theme)
{
m_gui_settings->SetValue(gui::m_currentStylesheet, "Darker Style by TheMitoSan");
}