From 5e8d6e0e5a381349fab3adc54543248640b1a9bd Mon Sep 17 00:00:00 2001 From: Jean Pierre Cimalando Date: Mon, 12 Apr 2021 18:56:59 +0200 Subject: [PATCH] Assign theme colors to the panel --- plugins/editor/src/editor/Editor.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/plugins/editor/src/editor/Editor.cpp b/plugins/editor/src/editor/Editor.cpp index 3a6ed533..050de568 100644 --- a/plugins/editor/src/editor/Editor.cpp +++ b/plugins/editor/src/editor/Editor.cpp @@ -876,8 +876,10 @@ void Editor::Impl::createFrameContents() box->setNameLabelText(label); box->setNameLabelFont(font); box->setKnobFont(font); + box->setCCLabelFont(font); OnThemeChanged.push_back([box, palette]() { box->setNameLabelFontColor(palette->text); + box->setCCLabelFontColor(palette->text); box->setKnobFontColor(palette->text); box->setKnobLineIndicatorColor(palette->knobLineIndicator); }); @@ -892,8 +894,16 @@ void Editor::Impl::createFrameContents() container->setBackground(background); return container; }; - auto createControlsPanel = [](const CRect& bounds, int, const char*, CHoriTxtAlign, int) { + auto createControlsPanel = [this, &palette](const CRect& bounds, int, const char*, CHoriTxtAlign, int) { auto* panel = new SControlsPanel(bounds); + OnThemeChanged.push_back([panel, palette]() { + panel->setNameLabelFontColor(palette->text); + panel->setCCLabelFontColor(palette->valueText); + panel->setKnobFontColor(palette->text); + panel->setKnobActiveTrackColor(palette->knobActiveTrack); + panel->setKnobInactiveTrackColor(palette->knobInactiveTrack); + panel->setKnobLineIndicatorColor(palette->knobLineIndicator); + }); return panel; };