1
0
mirror of https://github.com/KDE/latte-dock.git synced 2025-03-21 22:50:14 +03:00

fix #444,use m_drawShadows for external shadows

This commit is contained in:
Michail Vourlakos 2017-05-07 15:18:14 +03:00
parent 7d3458d45c
commit d1cb29b716

View File

@ -780,7 +780,7 @@ void DockView::setBehaveAsPlasmaPanel(bool behavior)
m_behaveAsPlasmaPanel = behavior;
if (m_behaveAsPlasmaPanel) {
if (m_behaveAsPlasmaPanel && m_drawShadows) {
PanelShadows::self()->addWindow(this, enabledBorders());
} else {
PanelShadows::self()->removeWindow(this);
@ -805,6 +805,14 @@ void DockView::setDrawShadows(bool draw)
m_drawShadows = draw;
if (m_behaveAsPlasmaPanel && m_drawShadows) {
PanelShadows::self()->addWindow(this, enabledBorders());
} else {
PanelShadows::self()->removeWindow(this);
m_enabledBorders = Plasma::FrameSvg::AllBorders;
emit enabledBordersChanged();
}
emit drawShadowsChanged();
}
@ -1633,7 +1641,7 @@ void DockView::updateEnabledBorders()
emit enabledBordersChanged();
}
if (!m_behaveAsPlasmaPanel) {
if (!m_behaveAsPlasmaPanel || !m_drawShadows) {
PanelShadows::self()->removeWindow(this);
} else {
PanelShadows::self()->setEnabledBorders(this, borders);