1
0
mirror of https://github.com/KDE/latte-dock.git synced 2025-01-12 17:17:50 +03:00

add option to mirror floating gap

--when a maximized window is present the
floating gap is mirrored above the dock or
panel in order to provide a much better
visual appearance
This commit is contained in:
Michail Vourlakos 2021-01-17 19:50:39 +02:00
parent 2c18052ad5
commit c456599881
4 changed files with 26 additions and 2 deletions

View File

@ -62,11 +62,15 @@
<entry name="floatingInternalGapIsForced" type="Int">
<default>1</default>
<label>floating internal gap is forced and provided to applets and any other view specific user interaction. "1" stands for Partially Checked (Auto)</label>
</entry>
</entry>
<entry name="hideFloatingGapForMaximized" type="Bool">
<default>false</default>
<label>floating gap is disabled when there are maximized windows</label>
</entry>
<entry name="floatingGapIsMirroredForMaximized" type="Bool">
<default>false</default>
<label>floating gap is mirrored for maximized windows in AlwaysVisible visibility mode</label>
</entry>
<entry name="proportionIconSize" type="Double">
<default>-1</default>
<label>this is a percentage value, -1 means disabled</label>

View File

@ -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;
}
}

View File

@ -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

View File

@ -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;
}
}
}
}
}