upgrade applet shadows variable for cotainment

--replace deprecated configuration.shadows with
configuration.appletShadowsEnabled
pull/15/head
Michail Vourlakos
parent 39fbf728d5
commit 7ac648983f

@ -32,6 +32,10 @@
<default>5</default>
<label>last windows visibility mode used, 5 stands for "Windows Go Below"</label>
</entry>
<entry name="appletShadowsEnabled" type="Bool">
<default>true</default>
<label>enable latte drawn applet shadows</label>
</entry>
<!-- this is percentage -->
<entry name="thickMargin" type="Int">
@ -136,15 +140,6 @@
<entry name="splitterPosition2" type="Int">
<default>-1</default>
</entry>
<entry name="shadows" type="Enum">
<label>Shadows for the applets</label>
<choices>
<choice name="None"/>
<choice name="Locked"/>
<choice name="All"/>
</choices>
<default>2</default>
</entry>
<entry name="shadowColorType" type="Enum">
<label>Applets shadow color type</label>
<choices>
@ -230,6 +225,10 @@
<default>false</default>
<label>flag to check it deprecated panelPosition was changed to "alignment"</label>
</entry>
<entry name="shadowsUpgraded" type="Bool">
<default>false</default>
<label>flag to check it deprecated shadows was changed to "appletShadowsEnabled"</label>
</entry>
<entry name="tasksUpgraded" type="Bool">
<default>false</default>
<label>flag to check if Tasks properties were moved to Tasks plasmoid configuration. Since Latte v0.10 we can have multiple Tasks applets in the same dock</label>
@ -249,6 +248,16 @@
<label>DEPRECATED in 0.10 in favour of "alignment"</label>
</entry>
<entry name="shadows" type="Enum">
<label>Shadows for the applets</label>
<choices>
<choice name="None"/>
<choice name="Locked"/>
<choice name="All"/>
</choices>
<default>2</default>
</entry>
<!-- Deprecated Section Tasks -->
<!-- ________________________ -->
<!-- All Tasks properties are DEPRECATED and scheduled to be removed in v0.11 or v0.12 -->

@ -32,9 +32,20 @@ Item{
function v010_upgrade() {
root.upgrader_v010_alignment();
if (!plasmoid.configuration.shadowsUpgraded) {
if (plasmoid.configuration.shadows > 0) {
plasmoid.configuration.appletShadowsEnabled = true;
} else {
plasmoid.configuration.appletShadowsEnabled = false;
}
plasmoid.configuration.shadowsUpgraded = true;
}
if (!plasmoid.configuration.tasksUpgraded) {
v010_tasksMigrateTimer.start();
}
}
Item {

@ -640,11 +640,7 @@ Item{
active: appletItem.applet
&& graphicsSystem.isAccelerated
&& !appletColorizer.mustBeShown
&& (((plasmoid.configuration.shadows === 1 /*Locked Applets*/
&& (!appletItem.canBeHovered || (appletItem.originalAppletBehavior && (applet.pluginName !== root.plasmoidName))) )
|| (plasmoid.configuration.shadows === 2 /*All Applets*/
&& (applet.pluginName !== root.plasmoidName)))
|| (root.forceTransparentPanel && plasmoid.configuration.shadows>0 && applet.pluginName !== root.plasmoidName)) /*on forced transparent state*/
&& (root.enableShadows && applet.pluginName !== root.plasmoidName)
onActiveChanged: {
if (active && !isSeparator && graphicsSystem.isAccelerated) {

@ -36,7 +36,7 @@ Item {
id: colorizedAppletShadow
anchors.fill: colorizer
active: graphicsSystem.isAccelerated && (plasmoid.configuration.shadows >= 1) && (appletColorizer.opacity>0)
active: graphicsSystem.isAccelerated && plasmoid.configuration.appletShadowsEnabled && (appletColorizer.opacity>0)
sourceComponent: DropShadow{
anchors.fill: parent
@ -49,7 +49,7 @@ Item {
readonly property int shadowSize : root.appShadowSize
readonly property bool forcedShadow: root.forceTransparentPanel && plasmoid.configuration.shadows>0
readonly property bool forcedShadow: root.forceTransparentPanel && plasmoid.configuration.appletShadowsEnabled
&& applet && applet.pluginName !== root.plasmoidName ? true : false
}
}

@ -496,7 +496,7 @@ Item {
///BEGIN properties provided to Latte Plasmoid
//shadows for applets, it should be removed as the appleitems don't need it any more
property bool badges3DStyle: universalSettings ? universalSettings.badges3DStyle : true
property bool enableShadows: plasmoid.configuration.shadows || (root.forceTransparentPanel && plasmoid.configuration.shadows>0)
property bool enableShadows: plasmoid.configuration.appletShadowsEnabled
property bool dockIsHidden: latteView ? latteView.visibility.isHidden : true
property bool titleTooltips: plasmoid.configuration.titleTooltips

@ -58,17 +58,11 @@ PlasmaComponents.Page {
Layout.minimumHeight: implicitHeight
Layout.topMargin: units.smallSpacing
checked: plasmoid.configuration.shadows !== LatteCore.Types.NoneShadow
checked: plasmoid.configuration.appletShadowsEnabled
text: i18n("Shadows")
tooltip: i18n("Enable/disable applet shadows")
onPressed: {
if(plasmoid.configuration.shadows !== LatteCore.Types.AllAppletsShadow){
plasmoid.configuration.shadows = LatteCore.Types.AllAppletsShadow;
} else {
plasmoid.configuration.shadows = LatteCore.Types.NoneShadow;
}
}
onPressed: plasmoid.configuration.appletShadowsEnabled = !plasmoid.configuration.appletShadowsEnabled;
}
ColumnLayout {

@ -76,7 +76,7 @@ Grid {
plasmoid.configuration.useThemePanel = true;
plasmoid.configuration.solidPanel = false;
plasmoid.configuration.panelSize = 5;
plasmoid.configuration.shadows = 2;
plasmoid.configuration.appletShadowsEnabled = true;
plasmoid.configuration.zoomLevel = 16;
plasmoid.configuration.titleTooltips = true;
//plasmoid.configuration.autoDecreaseIconSize = true;
@ -121,7 +121,7 @@ Grid {
plasmoid.configuration.solidPanel = false;
plasmoid.configuration.panelSize = 100;
plasmoid.configuration.panelShadows = true;
plasmoid.configuration.shadows = 0;
plasmoid.configuration.appletShadowsEnabled = false;
plasmoid.configuration.zoomLevel = 0;
plasmoid.configuration.titleTooltips = false;
//plasmoid.configuration.autoDecreaseIconSize = false;

Loading…
Cancel
Save