option,always apply Fitt's Law for floating mode

-The use can specify to always apply Fitt's Law when
in floating mode
pull/11/head
Michail Vourlakos 5 years ago
parent 32f02c871e
commit 6a95af5f8c

@ -49,6 +49,10 @@
<default>false</default>
<label>this is a percentage value</label>
</entry>
<entry name="fittsLawIsRequested" type="Bool">
<default>false</default>
<label>floating views require Fitts Law to be applied</label>
</entry>
<entry name="proportionIconSize" type="Double">
<default>-1</default>
<label>this is a percentage value, -1 means disabled</label>

@ -79,6 +79,11 @@ Item {
return false;
}
if (screenEdgeMarginEnabled && plasmoid.configuration.fittsLawIsRequested) {
//! dont use when floating views are requesting Fitt's Law
return false;
}
return (visibilityManager.panelIsBiggerFromIconSize && (maxZoomFactor === 1.0)
&& (latteView.visibility.mode === Latte.Types.AlwaysVisible || latteView.visibility.mode === Latte.Types.WindowsGoBelow)
&& (plasmoid.configuration.panelPosition === Latte.Types.Justify)

@ -354,7 +354,7 @@ PlasmaComponents.Page {
value: plasmoid.configuration.maxLength
from: 30
to: 100
stepSize: 2
stepSize: 1
wheelEnabled: false
function updateMaxLength() {

@ -694,6 +694,20 @@ PlasmaComponents.Page {
}
}
LatteComponents.CheckBox {
id: fittsLawChk
Layout.maximumWidth: dialog.optionsWidth
text: i18n("Always use empty screen gap when in floating mode")
checked: plasmoid.configuration.fittsLawIsRequested
tooltip: i18n("When the dock or panel is in floating mode, the gap to the screen is also used by items")
visible: dialog.highLevel
enabled: !plasmoid.configuration.shrinkThickMargins && (plasmoid.configuration.screenEdgeMargin >= 0)
onClicked: {
plasmoid.configuration.fittsLawIsRequested = checked
}
}
LatteComponents.CheckBox {
Layout.maximumWidth: dialog.optionsWidth
// Layout.maximumHeight: mouseWheelChk.height

Loading…
Cancel
Save