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
pull/1/head
Michail Vourlakos 8 years ago
parent 9d55a65bf5
commit 49d8b145d2

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

@ -835,13 +835,13 @@ Item {
sourceComponent: DropShadow{ sourceComponent: DropShadow{
anchors.fill: parent anchors.fill: parent
color: forcedShadow ? "#ff040404" : "#ff080808" color: forcedShadow ? theme.backgroundColor : "#ff080808"
samples: 2 * radius samples: 2 * radius
source: container.fakeIconItem ? wrapperContainer : container.applet source: container.fakeIconItem ? wrapperContainer : container.applet
radius: shadowSize radius: shadowSize
verticalOffset: forcedShadow ? 1 : 2 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 property bool forcedShadow: root.forceTransparentPanel && applet.pluginName !== root.plasmoidName ? true : false
} }

@ -120,7 +120,8 @@ DragDrop.DropArea {
property int panelEdgeSpacing: iconSize / 3 property int panelEdgeSpacing: iconSize / 3
property int panelTransparency: plasmoid.configuration.panelTransparency 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 property int totalPanelEdgeSpacing: 0 //this is set by PanelBox
//FIXME: this is not needed any more probably //FIXME: this is not needed any more probably

Loading…
Cancel
Save