mirror of
https://github.com/KDE/latte-dock.git
synced 2025-03-12 00:58:18 +03:00
improve some semantics in AppletItem
This commit is contained in:
parent
e05c5e2515
commit
5c5084f7bb
@ -106,15 +106,15 @@ Item {
|
||||
}
|
||||
|
||||
//applet is in starting edge
|
||||
property bool startEdge: (index >=0) &&
|
||||
((index === layoutsContainer.startLayout.firstVisibleIndex)
|
||||
|| (index === layoutsContainer.mainLayout.firstVisibleIndex)
|
||||
|| (index === layoutsContainer.endLayout.firstVisibleIndex))
|
||||
property bool firstAppletInContainer: (index >=0) &&
|
||||
((index === layoutsContainer.startLayout.firstVisibleIndex)
|
||||
|| (index === layoutsContainer.mainLayout.firstVisibleIndex)
|
||||
|| (index === layoutsContainer.endLayout.firstVisibleIndex))
|
||||
//applet is in ending edge
|
||||
property bool endEdge: (index >=0) &&
|
||||
((index === layoutsContainer.startLayout.lastVisibleIndex)
|
||||
|| (index === layoutsContainer.mainLayout.lastVisibleIndex)
|
||||
|| (index === layoutsContainer.endLayout.lastVisibleIndex))
|
||||
property bool lastAppletInContainer: (index >=0) &&
|
||||
((index === layoutsContainer.startLayout.lastVisibleIndex)
|
||||
|| (index === layoutsContainer.mainLayout.lastVisibleIndex)
|
||||
|| (index === layoutsContainer.endLayout.lastVisibleIndex))
|
||||
|
||||
readonly property bool acceptMouseEvents: applet && !isLattePlasmoid && !originalAppletBehavior && !appletItem.isSeparator && !communicator.parabolicEffectLocked
|
||||
readonly property bool originalAppletBehavior: (root.zoomFactor === 1 && !lockZoom /*hacky flag to keep Latte behavior*/)
|
||||
|
@ -28,7 +28,7 @@ Item{
|
||||
height: root.isHorizontal ? wrapper.height : nHiddenSize
|
||||
|
||||
///check also if this is the first/last plasmoid in anylayout
|
||||
visible: (rightSpacer ? appletItem.endEdge : appletItem.startEdge) || separatorSpace>0
|
||||
visible: (rightSpacer ? appletItem.lastAppletInContainer : appletItem.firstAppletInContainer) || separatorSpace>0
|
||||
|
||||
property bool neighbourSeparator: false;
|
||||
|
||||
@ -46,7 +46,7 @@ Item{
|
||||
property bool rightSpacer: false
|
||||
|
||||
readonly property bool atEdgeForcingFittsLaw: !isSeparator && !parabolicEffectMarginsEnabled && atScreenEdge
|
||||
readonly property int subtrackedMargins: atEdgeForcingFittsLaw && ((startEdge && rightSpacer) || (endEdge && !rightSpacer )) ?
|
||||
readonly property int subtrackedMargins: atEdgeForcingFittsLaw && ((firstAppletInContainer && rightSpacer) || (lastAppletInContainer && !rightSpacer )) ?
|
||||
root.lengthExtMargin : 0
|
||||
|
||||
property real nScale: 0
|
||||
|
@ -669,12 +669,12 @@ Item{
|
||||
}*/
|
||||
|
||||
//Left hiddenSpacer
|
||||
if(appletItem.startEdge){
|
||||
if(appletItem.firstAppletInContainer){
|
||||
hiddenSpacerLeft.nScale = scales.leftScale - 1;
|
||||
}
|
||||
|
||||
//Right hiddenSpacer ///there is one more item in the currentLayout ????
|
||||
if(appletItem.endEdge){
|
||||
if(appletItem.lastAppletInContainer){
|
||||
hiddenSpacerRight.nScale = scales.rightScale - 1;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user