diff --git a/containment/package/contents/config/main.xml b/containment/package/contents/config/main.xml index fcc3d238b..078766f6a 100644 --- a/containment/package/contents/config/main.xml +++ b/containment/package/contents/config/main.xml @@ -62,11 +62,15 @@ 1 - + false + + false + + -1 diff --git a/containment/package/contents/ui/VisibilityManager.qml b/containment/package/contents/ui/VisibilityManager.qml index ec2fb3d60..27d537601 100644 --- a/containment/package/contents/ui/VisibilityManager.qml +++ b/containment/package/contents/ui/VisibilityManager.qml @@ -316,7 +316,9 @@ Item{ return isCapableToHideScreenGap ? thicknessAsPanel : (2*metrics.mask.screenEdge) + thicknessAsPanel; } - var edgeThickness = isCapableToHideScreenGap ? 0 : metrics.mask.screenEdge * 2; + var mirrorGapFactor = root.mirrorScreenGap ? 2 : 1; + + var edgeThickness = isCapableToHideScreenGap ? 0 : metrics.mask.screenEdge * mirrorGapFactor; return edgeThickness + metrics.mask.thickness.maxNormalForItemsWithoutScreenEdge; } } diff --git a/containment/package/contents/ui/main.qml b/containment/package/contents/ui/main.qml index 24033acc8..c82aa917e 100644 --- a/containment/package/contents/ui/main.qml +++ b/containment/package/contents/ui/main.qml @@ -189,6 +189,12 @@ Item { property bool hideLengthScreenGaps: false /*set through binding*/ + property bool mirrorScreenGap: screenEdgeMarginEnabled + && plasmoid.configuration.floatingGapIsMirroredForMaximized + && !plasmoid.configuration.hideFloatingGapForMaximized + && latteView.visibility.mode === LatteCore.Types.AlwaysVisible + + property int themeColors: plasmoid.configuration.themeColors property int windowColors: plasmoid.configuration.windowColors diff --git a/shell/package/contents/configuration/pages/BehaviorConfig.qml b/shell/package/contents/configuration/pages/BehaviorConfig.qml index 9f1133f3e..0d286fc3f 100644 --- a/shell/package/contents/configuration/pages/BehaviorConfig.qml +++ b/shell/package/contents/configuration/pages/BehaviorConfig.qml @@ -883,6 +883,18 @@ PlasmaComponents.Page { plasmoid.configuration.hideFloatingGapForMaximized = checked; } } + + LatteComponents.CheckBox { + Layout.maximumWidth: dialog.optionsWidth + enabled: !plasmoid.configuration.hideFloatingGapForMaximized + text: i18n("Mirror floating gap for maximized windows") + checked: plasmoid.configuration.floatingGapIsMirroredForMaximized + tooltip: i18n("Floating gap is mirrored when there are maximized windows in Always Visible mode") + + onClicked: { + plasmoid.configuration.floatingGapIsMirroredForMaximized = checked; + } + } } } }