From e1c2ce9e426d3fdfe3f14c8ab3ae437e22f6a193 Mon Sep 17 00:00:00 2001 From: David Capello Date: Thu, 28 Sep 2017 12:50:58 -0300 Subject: [PATCH] Minor change in ContextBar::InkShadesField::ShadeWidget --- src/app/ui/context_bar.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/app/ui/context_bar.cpp b/src/app/ui/context_bar.cpp index f888dc5d7..0d63419ef 100644 --- a/src/app/ui/context_bar.cpp +++ b/src/app/ui/context_bar.cpp @@ -453,6 +453,7 @@ class ContextBar::InkShadesField : public HBox { , m_dragIndex(-1) , m_boxSize(12) { setText("Select colors in the palette"); + initTheme(); } void reverseShadeColors() { @@ -529,6 +530,11 @@ class ContextBar::InkShadesField : public HBox { private: + void onInitTheme(InitThemeEvent& ev) override { + Widget::onInitTheme(ev); + setStyle(SkinTheme::instance()->styles.menuShadeView()); + } + void onChangeColorBarSelection() { if (!isVisible()) return; @@ -796,12 +802,6 @@ private: for (const Shade& shade : m_shades) { auto shadeWidget = new ShadeWidget(shade, ShadeWidget::Select); shadeWidget->setExpansive(true); - shadeWidget->InitTheme.connect( - [shadeWidget]{ - shadeWidget->setStyle( - SkinTheme::instance()->styles.menuShadeView()); - }); - shadeWidget->initTheme(); shadeWidget->Click.connect( [&]{ m_shade.setShade(shade);