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

fixes for showBackOnlyOnMaximized design

--improve applets shadows, now the shadows used
are using the backgroundColor when a transparent
panel is forced
--identify better when shadows should be drawn
This commit is contained in:
Michail Vourlakos 2017-05-18 01:23:15 +03:00
parent 9d55a65bf5
commit 49d8b145d2
3 changed files with 8 additions and 7 deletions

View File

@ -792,8 +792,8 @@ void DockView::setBehaveAsPlasmaPanel(bool behavior)
PanelShadows::self()->addWindow(this, enabledBorders());
} else {
PanelShadows::self()->removeWindow(this);
m_enabledBorders = Plasma::FrameSvg::AllBorders;
emit enabledBordersChanged();
// m_enabledBorders = Plasma::FrameSvg::AllBorders;
// emit enabledBordersChanged();
}
updateEffects();
@ -817,8 +817,8 @@ void DockView::setDrawShadows(bool draw)
PanelShadows::self()->addWindow(this, enabledBorders());
} else {
PanelShadows::self()->removeWindow(this);
m_enabledBorders = Plasma::FrameSvg::AllBorders;
emit enabledBordersChanged();
//m_enabledBorders = Plasma::FrameSvg::AllBorders;
//emit enabledBordersChanged();
}
emit drawShadowsChanged();

View File

@ -835,13 +835,13 @@ Item {
sourceComponent: DropShadow{
anchors.fill: parent
color: forcedShadow ? "#ff040404" : "#ff080808"
color: forcedShadow ? theme.backgroundColor : "#ff080808"
samples: 2 * radius
source: container.fakeIconItem ? wrapperContainer : container.applet
radius: shadowSize
verticalOffset: forcedShadow ? 1 : 2
property int shadowSize : forcedShadow? 7 : Math.ceil(root.iconSize / 12)
property int shadowSize : forcedShadow? 8 : Math.ceil(root.iconSize / 12)
property bool forcedShadow: root.forceTransparentPanel && applet.pluginName !== root.plasmoidName ? true : false
}

View File

@ -120,7 +120,8 @@ DragDrop.DropArea {
property int panelEdgeSpacing: iconSize / 3
property int panelTransparency: plasmoid.configuration.panelTransparency
property bool panelShadowsActive: plasmoid.configuration.panelShadows && !root.forceTransparentPanel
property bool panelShadowsActive: (plasmoid.configuration.panelShadows && !root.backgroundOnlyOnMaximized)
|| (plasmoid.configuration.panelShadows && root.backgroundOnlyOnMaximized && windowsModel.hasMaximizedWindow)
property int totalPanelEdgeSpacing: 0 //this is set by PanelBox
//FIXME: this is not needed any more probably