Minor change in ContextBar::InkShadesField::ShadeWidget

This commit is contained in:
David Capello 2017-09-28 12:50:58 -03:00
parent 7dc7bf09e2
commit e1c2ce9e42

View File

@ -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);