mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-04 21:39:52 +08:00
prompt for restart after changing theme
This commit is contained in:
parent
18a8927efb
commit
b33564726c
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,2 +1,2 @@
|
||||
VNote.pro.user
|
||||
VNote.pro.user*
|
||||
CMakeLists.txt.user
|
||||
|
@ -3127,9 +3127,11 @@ void VMainWindow::initThemeMenu(QMenu *p_menu)
|
||||
|
||||
QActionGroup *ag = new QActionGroup(this);
|
||||
connect(ag, &QActionGroup::triggered,
|
||||
this, [](QAction *p_action) {
|
||||
this, [this](QAction *p_action) {
|
||||
QString data = p_action->data().toString();
|
||||
g_config->setTheme(data);
|
||||
|
||||
promptForVNoteRestart();
|
||||
});
|
||||
|
||||
QList<QString> themes = g_config->getThemes();
|
||||
@ -3585,3 +3587,16 @@ void VMainWindow::collectUserStat() const
|
||||
});
|
||||
}
|
||||
|
||||
void VMainWindow::promptForVNoteRestart()
|
||||
{
|
||||
int ret = VUtils::showMessage(QMessageBox::Information,
|
||||
tr("Restart Needed"),
|
||||
tr("Do you want to restart VNote now?"),
|
||||
tr("VNote needs to restart to apply new configurations."),
|
||||
QMessageBox::Ok | QMessageBox::No,
|
||||
QMessageBox::Ok,
|
||||
this);
|
||||
if (ret == QMessageBox::Ok) {
|
||||
restartVNote();
|
||||
}
|
||||
}
|
||||
|
@ -331,6 +331,8 @@ private:
|
||||
|
||||
void updateFontOfAllTabs();
|
||||
|
||||
void promptForVNoteRestart();
|
||||
|
||||
// Captain mode functions.
|
||||
|
||||
// Popup the attachment list if it is enabled.
|
||||
|
Loading…
x
Reference in New Issue
Block a user