diff --git a/libs/ui/dialogs/kis_dlg_layer_style.h b/libs/ui/dialogs/kis_dlg_layer_style.h
--- a/libs/ui/dialogs/kis_dlg_layer_style.h
+++ b/libs/ui/dialogs/kis_dlg_layer_style.h
@@ -251,6 +251,7 @@
void notifyGuiConfigChanged();
void notifyPredefinedStyleSelected(KisPSDLayerStyleSP style);
+ void notifyBevelAndEmbossToggle();
void changePage(QListWidgetItem *, QListWidgetItem*);
diff --git a/libs/ui/dialogs/kis_dlg_layer_style.cpp b/libs/ui/dialogs/kis_dlg_layer_style.cpp
--- a/libs/ui/dialogs/kis_dlg_layer_style.cpp
+++ b/libs/ui/dialogs/kis_dlg_layer_style.cpp
@@ -101,14 +101,18 @@
wdgLayerStyles.stylesStack->addWidget(m_innerGlow);
connect(m_innerGlow, SIGNAL(configChanged()), SLOT(notifyGuiConfigChanged()));
+ // Contour and Texture are sub-styles of Bevel and Emboss
+ // They are only applied to canvas when Bevel and Emboss is active.
m_contour = new Contour(this);
m_texture = new Texture(this);
m_bevelAndEmboss = new BevelAndEmboss(m_contour, m_texture, this);
wdgLayerStyles.stylesStack->addWidget(m_bevelAndEmboss);
wdgLayerStyles.stylesStack->addWidget(m_contour);
wdgLayerStyles.stylesStack->addWidget(m_texture);
+ // notifyBevelAndEmbossToggle() enables/disables Contour and Texture on Bevel and Emboss toggle.
+ connect(m_bevelAndEmboss, SIGNAL(configChanged()), SLOT(notifyBevelAndEmbossToggle()));
connect(m_bevelAndEmboss, SIGNAL(configChanged()), SLOT(notifyGuiConfigChanged()));
m_satin = new Satin(this);
@@ -196,6 +200,32 @@
m_configChangedCompressor->start();
}
+void KisDlgLayerStyle::notifyBevelAndEmbossToggle() {
+ QListWidgetItem *item;
+
+ if (m_layerStyle->bevelAndEmboss()->effectEnabled()) {
+ // Enable "Contour" (list item 7)
+ item = wdgLayerStyles.lstStyleSelector->item(7);
+ auto currentFlags7 = item->flags();
+ item->setFlags(currentFlags7 | Qt::ItemIsEnabled);
+
+ // Enable "Texture" (list item 8)
+ item = wdgLayerStyles.lstStyleSelector->item(8);
+ auto currentFlags8 = item->flags();
+ item->setFlags(currentFlags8 | Qt::ItemIsEnabled);
+ }
+ else {
+ // Disable "Contour"
+ item = wdgLayerStyles.lstStyleSelector->item(7);
+ auto currentFlags7 = item->flags();
+ item->setFlags(currentFlags7 & (~Qt::ItemIsEnabled));
+
+ // Disable "Texture"
+ item = wdgLayerStyles.lstStyleSelector->item(8);
+ auto currentFlags8 = item->flags();
+ item->setFlags(currentFlags8 & (~Qt::ItemIsEnabled));
+ }
+}
void KisDlgLayerStyle::slotNotifyOnAccept()
{
diff --git a/libs/ui/layerstyles/wdglayerstyles.ui b/libs/ui/layerstyles/wdglayerstyles.ui
--- a/libs/ui/layerstyles/wdglayerstyles.ui
+++ b/libs/ui/layerstyles/wdglayerstyles.ui
@@ -6,8 +6,8 @@
0
0
- 473
- 335
+ 1607
+ 924
@@ -82,14 +82,20 @@
Unchecked
+
+ ItemIsSelectable|ItemIsDragEnabled|ItemIsUserCheckable
+
-
Texture
Unchecked
+
+ ItemIsSelectable|ItemIsDragEnabled|ItemIsUserCheckable
+
-