@@ -76,8 +76,8 @@ void MainWindow::initUI()
7676 ui->autoToggle ->setText (tr (" Auto Mode" ));
7777 ui->hotkeyToggle ->setText (tr (" Hotkey Mode" ));
7878
79- auto settingsBtn = ui->bottomWidget ->findChild <QtMaterialFlatButton *>(" settingsBtn" );
80- auto aboutBtn = ui->bottomWidget ->findChild <QtMaterialFlatButton *>(" aboutBtn" );
79+ settingsBtn = ui->bottomWidget ->findChild <QtMaterialFlatButton *>(" settingsBtn" );
80+ aboutBtn = ui->bottomWidget ->findChild <QtMaterialFlatButton *>(" aboutBtn" );
8181
8282// settingsBtn->setIcon(QIcon(":/icons/settings"));
8383 settingsBtn->setRole (Material::Primary);
@@ -123,16 +123,17 @@ void MainWindow::initConnections()
123123
124124connect (hotkey, &QHotkey::activated,this , &MainWindow::shortcutTriggered);
125125
126- // connect(floatBtn, &QtMaterialFloatingActionButton::clicked, this, [&]() {
127- // if (settingsWindow == nullptr) {
128- // settingsWindow = new SettingsWindow(this);
129-
130- // connect(settingsWindow, &SettingsWindow::closed, this, [&]() { settingsWindow = nullptr; });
131- // settingsWindow->show();
132- // settingsWindow->raise();
133- // settingsWindow->activateWindow();
134- // }
135- // });
126+ connect (settingsBtn, &QtMaterialFlatButton::clicked,this , [&]() {
127+ if (settingsWindow ==nullptr ) {
128+ settingsWindow =new SettingsWindow (this );
129+
130+ connect (settingsWindow, &SettingsWindow::closed,this , [&]() { settingsWindow =nullptr ; });
131+
132+ settingsWindow->show ();
133+ settingsWindow->raise ();
134+ settingsWindow->activateWindow ();
135+ }
136+ });
136137}
137138
138139void MainWindow::loadSettings ()