Commit d1720500 authored by NICLAUSSE Nicolas's avatar NICLAUSSE Nicolas
Browse files

Merge branch '58-bug-themes-can-t-be-switched' into 'develop'

Resolve "[BUG] Themes can't be switched"

Closes #58

See merge request !59
parents ca8fc6ab c56cb52a
Pipeline #135549 passed with stage
in 0 seconds
......@@ -94,7 +94,8 @@ dtkWidgetsMenu *dtkWidgetsMainWindow::populateThemesMenu(void)
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 *>(inner_menu_theme->addItem(new dtkWidgetsMenuItemTheme(theme))), &dtkWidgetsMenuItem::clicked, [=] (void) -> void {
dtkWidgetsMenuItem * item = inner_menu_theme->addItem(new dtkWidgetsMenuItemTheme(theme));
connect(item, &dtkWidgetsMenuItem::clicked, [=] () {
dtkThemesEngine::instance()->apply(theme);
});
}
......
......@@ -192,7 +192,7 @@ dtkWidgetsMenuItemFacade::dtkWidgetsMenuItemFacade(dtkWidgetsMenuItem *source, Q
{
Q_ASSERT_X(this->menu_item, Q_FUNC_INFO, "Input dtkWidgetsMenuItem must be non void.");
connect(this, SIGNAL(clicked()), source, SIGNAL(clicked()));
connect(this, &dtkWidgetsMenuItemFacade::clicked, source, &dtkWidgetsMenuItem::clicked);
this->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
}
......
Supports Markdown
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