animate dynamic screen edge margin behavior

--when the view is NOT behavingAsPlasmaPanel then for
those cases we can animate the screenEdgeMargin
shrinking/expanding
pull/11/head
Michail Vourlakos 5 years ago
parent ada7be1a52
commit 07a1065320

@ -408,7 +408,16 @@ Item {
property int thickMargin: thickMarginFactor * root.iconSize
property bool screenEdgeMarginEnabled: plasmoid.configuration.screenEdgeMargin >= 0 && !plasmoid.configuration.shrinkThickMargins
property int screenEdgeMargin: !screenEdgeMarginEnabled || hideThickScreenGap ? 0 : plasmoid.configuration.screenEdgeMargin
property int screenEdgeMargin: {
//! is used for window geometry calculations
if (!screenEdgeMarginEnabled
|| (hideThickScreenGap && localScreenEdgeMargin === 0)) {
/*window geometry is updated after the local screen margin animation was zeroed*/
return 0;
}
return plasmoid.configuration.screenEdgeMargin;
}
property int localScreenEdgeMargin: (screenEdgeMarginEnabled && behaveAsPlasmaPanel)
|| !screenEdgeMarginEnabled
|| hideThickScreenGap ? 0 : plasmoid.configuration.screenEdgeMargin
@ -637,6 +646,15 @@ Item {
}
}
Behavior on localScreenEdgeMargin {
enabled: !behaveAsPlasmaPanel
NumberAnimation {
duration: 0.8 * root.animationTime
easing.type: Easing.OutCubic
}
}
Behavior on iconSize {
enabled: !(root.editMode && root.behaveAsPlasmaPanel)
NumberAnimation {

Loading…
Cancel
Save