restore Fitt's Law for edge Applets

--when the Latte View is in Justify mode
and and an applet is touching the screen edge
then for that applet any margins from the
Screen edge should be removed. That way
the Fitt's Law is obeyed. What is going to
happen for the margins of these applets with
their neighbour applets will be considered
in the future.

BUG: 408412
pull/6/head
Michail Vourlakos 6 years ago
parent 79ae6a6de4
commit 3f88341bcb

@ -115,8 +115,12 @@ Item{
property int iconSize: root.iconSize
property int marginWidth: root.isVertical ? root.thickMargins : localLengthMargins
property int marginHeight: root.isHorizontal ? root.thickMargins : localLengthMargins
property int marginWidth: root.isVertical ?
root.thickMargins :
(root.inFullJustify && atScreenEdge ? 0 : localLengthMargins) //Fitt's Law
property int marginHeight: root.isHorizontal ?
root.thickMargins :
(root.inFullJustify && atScreenEdge ? 0 : localLengthMargins) //Fitt's Law
property int localLengthMargins: isSpacer || isSeparator ? 0 : root.lengthMargins
@ -210,7 +214,7 @@ Item{
updateLayoutWidth();
}
onAppletMinimumHeightChanged: {
onAppletMinimumHeightChanged: {
if(zoomScale === 1) {
checkCanBeHovered();
}

@ -42,11 +42,13 @@ Loader {
return indicators.indicatorComponent;
}
width: root.isHorizontal ? appletItem.wrapperAlias.width - 2*appletItem.wrapperAlias.zoomScale*root.lengthExtMargin
: appletItem.wrapperAlias.width;
width: root.isHorizontal && !(root.inFullJustify && atScreenEdge /*Fitt's Law*/) ?
appletItem.wrapperAlias.width - 2*appletItem.wrapperAlias.zoomScale*root.lengthExtMargin
: appletItem.wrapperAlias.width
height: root.isVertical ? appletItem.wrapperAlias.height - 2*appletItem.wrapperAlias.zoomScale*root.lengthExtMargin :
appletItem.wrapperAlias.height;
height: root.isVertical && !(root.inFullJustify && atScreenEdge /*Fitt's Law*/) ?
appletItem.wrapperAlias.height - 2*appletItem.wrapperAlias.zoomScale*root.lengthExtMargin :
appletItem.wrapperAlias.height
readonly property bool locked: appletItem.lockZoom || root.zoomFactor === 1

Loading…
Cancel
Save