Initialize theme for HueSaturationWindow

This commit is contained in:
Martín Capello 2022-12-15 16:06:19 -03:00 committed by David Capello
parent 3ab993d1d6
commit cc3c421391
2 changed files with 7 additions and 1 deletions

View File

@ -80,6 +80,7 @@ public:
m_sliders.setMode(ColorSliders::Mode::Relative);
m_sliders.ColorChange.connect([this]{ onChangeControls(); });
initTheme();
onChangeMode();
}

View File

@ -241,7 +241,6 @@ ColorSliders::ColorSliders()
, m_color(app::Color::fromMask())
{
addChild(&m_grid);
m_grid.setChildSpacing(0);
// Same order as in Channel enum
static_assert(Channel::Red == (Channel)0, "");
@ -258,6 +257,12 @@ ColorSliders::ColorSliders()
addSlider(Channel::Gray, "V", 0, 255, -100, 100);
addSlider(Channel::Alpha, "A", 0, 255, -100, 100);
InitTheme.connect(
[this] {
m_grid.setChildSpacing(0);
}
);
m_appConn = App::instance()
->ColorSpaceChange.connect([this]{ invalidate(); });
}