mirror of
https://github.com/KDE/latte-dock.git
synced 2024-12-25 19:21:41 +03:00
improvements for margins/paddings
--fix also how firstVisibleIndex is tracked for AppletContainer(s)
This commit is contained in:
parent
5c5084f7bb
commit
2577c33b7d
@ -88,6 +88,10 @@ Item {
|
||||
property bool lastChildOfEndLayout: index === layoutsContainer.endLayout.lastVisibleIndex
|
||||
|
||||
readonly property bool atScreenEdge: {
|
||||
if (plasmoid.configuration.maxLength!==100 || plasmoid.configuration.offset!==0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (root.isHorizontal) {
|
||||
if (firstChildOfStartLayout) {
|
||||
return latteView && latteView.x === latteView.screenGeometry.x;
|
||||
@ -153,7 +157,7 @@ Item {
|
||||
is taking all the space needed in order to fill right. For atScreenEdge appplets that should be: applet size + lengthAppletIntMargin + lengthAppletExtMargin.
|
||||
The indicator should follow also the applet alignment in this in order to feel right
|
||||
*/
|
||||
return atScreenEdge ? lengthAppletIntMargin / 2 /*Fitt's*/ : 2 * lengthAppletIntMargin;
|
||||
return 2 * lengthAppletIntMargin;
|
||||
}
|
||||
|
||||
property int internalHeightMargins: {
|
||||
@ -165,7 +169,7 @@ Item {
|
||||
is taking all the space needed in order to fill right. For atScreenEdge appplets that should be: applet size + lengthAppletIntMargin + lengthAppletExtMargin.
|
||||
The indicator should follow also the applet alignment in this in order to feel right
|
||||
*/
|
||||
return atScreenEdge ? lengthAppletIntMargin / 2 /*Fitt's*/ : 2 * lengthAppletIntMargin;
|
||||
return 2 * lengthAppletIntMargin;
|
||||
}
|
||||
|
||||
//! are set by the indicator
|
||||
|
@ -47,7 +47,7 @@ Item{
|
||||
|
||||
readonly property bool atEdgeForcingFittsLaw: !isSeparator && !parabolicEffectMarginsEnabled && atScreenEdge
|
||||
readonly property int subtrackedMargins: atEdgeForcingFittsLaw && ((firstAppletInContainer && rightSpacer) || (lastAppletInContainer && !rightSpacer )) ?
|
||||
root.lengthExtMargin : 0
|
||||
root.lengthExtMargin + root.lengthIntMargin : 0
|
||||
|
||||
property real nScale: 0
|
||||
|
||||
|
@ -104,7 +104,7 @@ Grid {
|
||||
}
|
||||
|
||||
var ind = -1;
|
||||
for (var i=0; i>=children[i].length-1; ++i){
|
||||
for (var i=0; i<=children.length-1; ++i){
|
||||
if (children[i]
|
||||
&& (children[i].index<ind || ind === -1)
|
||||
&& children[i].applet
|
||||
|
Loading…
Reference in New Issue
Block a user