Commit f4ac42da authored by CABEL Tristan's avatar CABEL Tristan

deactivate unused fileMenu and AboutMenu. Move ThemeMenu in a sub-menu

parent 43f27366
......@@ -58,9 +58,9 @@ void dtkWidgetsMainWindow::populate(void)
{
Q_UNUSED(this->menubar());
Q_UNUSED(this->populateFileMenu());
//Q_UNUSED(this->populateFileMenu());
Q_UNUSED(this->populateThemesMenu());
Q_UNUSED(this->populateAboutMenu());
//Q_UNUSED(this->populateAboutMenu());
}
dtkWidgetsMenu *dtkWidgetsMainWindow::populateFileMenu(void)
......@@ -81,9 +81,9 @@ dtkWidgetsMenu *dtkWidgetsMainWindow::populateThemesMenu(void)
if(!d->menu_themes) {
d->menu_themes = d->menubar->addMenu(fa::paintbrush, "Themes");
auto *inner_menu_theme = d->menu_themes->addMenu(fa::paintbrush, "Choose Theme");
for (const QString theme : dtkThemesEngine::instance()->themes()) {
connect(static_cast<dtkWidgetsMenuItem *>(d->menu_themes->addItem(new dtkWidgetsMenuItemTheme(theme))), &dtkWidgetsMenuItem::clicked, [=] (void) -> void {
connect(static_cast<dtkWidgetsMenuItem *>(inner_menu_theme->addItem(new dtkWidgetsMenuItemTheme(theme))), &dtkWidgetsMenuItem::clicked, [=] (void) -> void {
dtkThemesEngine::instance()->apply(theme);
});
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment