rename applet(container) to appletItem

--improve naming for main applet item
pull/4/head
Michail Vourlakos 6 years ago
parent abeb42935b
commit eddb6d229f

@ -66,7 +66,7 @@ Item{
return 1;
}
property bool isActive: (container.isExpanded && !container.isSystray
property bool isActive: (appletItem.isExpanded && !appletItem.isSystray
&& applet.pluginName !== root.plasmoidName
&& applet.pluginName !== "org.kde.activeWindowControl"
&& applet.pluginName !== "org.kde.plasma.appmenu")

@ -34,7 +34,7 @@ import "colorizer" as Colorizer
import "communicator" as Communicator
Item {
id: container
id: appletItem
visible: false
width: isInternalViewSplitter && !root.editMode ? 0 : (root.isHorizontal ? computeWidth : computeWidth + shownAppletMargin)
@ -134,8 +134,8 @@ Item {
//if the event is at the active indicator or spacers area then try to expand the applet,
//unfortunately for other applets there is no other way to activate them yet
//for example the icon-only applets
var choords = mapToItem(container.appletWrapper, mouse.x, mouse.y);
if (choords.x<0 || choords.y<0 || choords.x>=container.appletWrapper.width || choords.y>=container.appletWrapper.height) {
var choords = mapToItem(appletItem.appletWrapper, mouse.x, mouse.y);
if (choords.x<0 || choords.y<0 || choords.x>=container.appletWrapper.width || choords.y>=appletItem.appletWrapper.height) {
latteView.toggleAppletExpanded(applet.id);
}
}
@ -144,14 +144,14 @@ Item {
index = -1;
for(var i=0; i<layoutsContainer.startLayout.count; ++i){
if(layoutsContainer.startLayout.children[i] === container){
if(layoutsContainer.startLayout.children[i] === appletItem){
index = layoutsContainer.startLayout.beginIndex + i;
break;
}
}
for(var i=0; i<layoutsContainer.mainLayout.count; ++i){
if(layoutsContainer.mainLayout.children[i] === container){
if(layoutsContainer.mainLayout.children[i] === appletItem){
index = layoutsContainer.mainLayout.beginIndex + i;
break;
}
@ -167,7 +167,7 @@ Item {
}
if(container.latteApplet){
if(appletItem.latteApplet){
if(index===layoutsContainer.startLayout.beginIndex || index===layoutsContainer.mainLayout.beginIndex || index===layoutsContainer.endLayout.beginIndex)
latteApplet.disableLeftSpacer = false;
else
@ -197,7 +197,7 @@ Item {
&& (applet && applet.pluginName !== "org.kde.plasma.panelspacer" && (applet.pluginName !== "org.kde.latte.spacer"))
&& !communicator.canShowOverlaiedLatteIcon)
|| (isSystray)
|| (container.needsFillSpace) ) {
|| (appletItem.needsFillSpace) ) {
canBeHovered = false;
}
else{
@ -207,7 +207,7 @@ Item {
//! pos in global root positioning
function containsPos(pos) {
var relPos = root.mapToItem(container,pos.x, pos.y);
var relPos = root.mapToItem(appletItem,pos.x, pos.y);
if (relPos.x>=0 && relPos.x<=width && relPos.y>=0 && relPos.y<=height)
return true;
@ -235,7 +235,7 @@ Item {
}
onIndexChanged: {
if (container.latteApplet) {
if (appletItem.latteApplet) {
root.latteAppletPos = index;
}
@ -276,26 +276,26 @@ Item {
}
onLatteAppletChanged: {
if(container.latteApplet){
root.latteApplet = container.latteApplet;
root.latteAppletContainer = container;
if(appletItem.latteApplet){
root.latteApplet = appletItem.latteApplet;
root.latteAppletContainer = appletItem;
root.latteAppletPos = index;
container.latteApplet.latteView = root;
container.latteApplet.forceHidePanel = true;
appletItem.latteApplet.latteView = root;
appletItem.latteApplet.forceHidePanel = true;
container.latteApplet.signalAnimationsNeedBothAxis.connect(slotAnimationsNeedBothAxis);
container.latteApplet.signalAnimationsNeedLength.connect(slotAnimationsNeedLength);
container.latteApplet.signalAnimationsNeedThickness.connect(slotAnimationsNeedThickness);
container.latteApplet.signalActionsBlockHiding.connect(slotActionsBlockHiding);
container.latteApplet.signalPreviewsShown.connect(slotPreviewsShown);
container.latteApplet.clearZoomSignal.connect(titleTooltipDialog.hide);
appletItem.latteApplet.signalAnimationsNeedBothAxis.connect(slotAnimationsNeedBothAxis);
appletItem.latteApplet.signalAnimationsNeedLength.connect(slotAnimationsNeedLength);
appletItem.latteApplet.signalAnimationsNeedThickness.connect(slotAnimationsNeedThickness);
appletItem.latteApplet.signalActionsBlockHiding.connect(slotActionsBlockHiding);
appletItem.latteApplet.signalPreviewsShown.connect(slotPreviewsShown);
appletItem.latteApplet.clearZoomSignal.connect(titleTooltipDialog.hide);
}
}
onLatteSpacerChanged: {
if(container.latteSpacer){
if(appletItem.latteSpacer){
latteSpacer.latteDock = root;
//container.lockZoom = true;
//appletItem.lockZoom = true;
}
}
@ -303,7 +303,7 @@ Item {
onShowZoomedChanged: {
if(showZoomed){
//var newZ = container.maxHeight / root.iconSize;
//var newZ = appletItem.maxHeight / root.iconSize;
//wrapper.zoomScale = newZ;
wrapper.zoomScale = 1;
}
@ -329,13 +329,13 @@ Item {
root.updateIndexes.disconnect(checkIndex);
root.clearZoomSignal.disconnect(clearZoom);
if (container.latteApplet) {
container.latteApplet.signalAnimationsNeedBothAxis.disconnect(slotAnimationsNeedBothAxis);
container.latteApplet.signalAnimationsNeedLength.disconnect(slotAnimationsNeedLength);
container.latteApplet.signalAnimationsNeedThickness.disconnect(slotAnimationsNeedThickness);
container.latteApplet.signalActionsBlockHiding.disconnect(slotActionsBlockHiding);
container.latteApplet.signalPreviewsShown.disconnect(slotPreviewsShown);
container.latteApplet.clearZoomSignal.disconnect(titleTooltipDialog.hide);
if (appletItem.latteApplet) {
appletItem.latteApplet.signalAnimationsNeedBothAxis.disconnect(slotAnimationsNeedBothAxis);
appletItem.latteApplet.signalAnimationsNeedLength.disconnect(slotAnimationsNeedLength);
appletItem.latteApplet.signalAnimationsNeedThickness.disconnect(slotAnimationsNeedThickness);
appletItem.latteApplet.signalActionsBlockHiding.disconnect(slotActionsBlockHiding);
appletItem.latteApplet.signalPreviewsShown.disconnect(slotPreviewsShown);
appletItem.latteApplet.clearZoomSignal.disconnect(titleTooltipDialog.hide);
}
}
@ -369,23 +369,23 @@ Item {
}
if(Math.abs(index-root.latteAppletPos+root.latteAppletHoveredIndex)>=Math.max(2,distance)) {
container.clearZoom();
appletItem.clearZoom();
}
}
}
onSignalActivateEntryAtIndex: {
if (parabolicManager.pseudoIndexBelongsToLatteApplet(entryIndex) && container.isLattePlasmoid) {
if (parabolicManager.pseudoIndexBelongsToLatteApplet(entryIndex) && appletItem.isLattePlasmoid) {
latteApplet.activateTaskAtIndex(entryIndex - latteApplet.tasksNumbersBase);
} else if (root.unifiedGlobalShortcuts && (entryIndex === parabolicManager.pseudoAppletIndex(container.index))) {
} else if (root.unifiedGlobalShortcuts && (entryIndex === parabolicManager.pseudoAppletIndex(appletItem.index))) {
latteView.toggleAppletExpanded(applet.id);
}
}
onSignalNewInstanceForEntryAtIndex: {
if (parabolicManager.pseudoIndexBelongsToLatteApplet(entryIndex) && container.isLattePlasmoid) {
if (parabolicManager.pseudoIndexBelongsToLatteApplet(entryIndex) && appletItem.isLattePlasmoid) {
latteApplet.newInstanceForTaskAtIndex(entryIndex - latteApplet.tasksNumbersBase);
} else if (root.unifiedGlobalShortcuts && (entryIndex === parabolicManager.pseudoAppletIndex(container.index))) {
} else if (root.unifiedGlobalShortcuts && (entryIndex === parabolicManager.pseudoAppletIndex(appletItem.index))) {
latteView.toggleAppletExpanded(applet.id);
}
}
@ -398,7 +398,7 @@ Item {
//is enough to clearZoom
if ( (root.zoomFactor>1) && (layoutsContainer.hoveredIndex>=0)
&& (Math.abs(index-layoutsContainer.hoveredIndex)>=2))
container.clearZoom();
appletItem.clearZoom();
if ((restoreAnimation.running) && (layoutsContainer.hoveredIndex !== -1)) {
restoreAnimation.stop();
@ -421,7 +421,7 @@ Item {
Communicator.Engine{
id: communicator
//set up the overlayed containers and properties for when a overlaiedIconItem must be presented to the user
//set up the overlayed appletItems and properties for when a overlaiedIconItem must be presented to the user
//because the plasma widgets specific implementation breaks the Latte experience
onOverlayLatteIconIsActiveChanged:{
if (!overlayLatteIconIsActive && applet.opacity===0) {
@ -464,7 +464,7 @@ Item {
property bool pressed: false
onPressed: {
container.activateAppletForNeutralAreas(mouse);
appletItem.activateAppletForNeutralAreas(mouse);
pressed = true;
mouse.accepted = false;
}
@ -478,8 +478,8 @@ Item {
//! Main Applet Shown Area
Flow{
id: appletFlow
width: container.computeWidth
height: container.computeHeight
width: appletItem.computeWidth
height: appletItem.computeHeight
anchors.rightMargin: (latteApplet || (showZoomed && root.editMode)) ||
(plasmoid.location !== PlasmaCore.Types.RightEdge) ? 0 : shownAppletMargin
@ -525,8 +525,8 @@ Item {
opacity: mustBeShown ? 1 : 0
readonly property bool mustBeShown: colorizerManager.mustBeShown
&& !container.userBlocksColorizing
&& !container.appletBlocksColorizing
&& !appletItem.userBlocksColorizing
&& !appletItem.appletBlocksColorizing
Behavior on opacity {
NumberAnimation {
@ -564,7 +564,7 @@ Item {
opacity: latteApplet && root.addLaunchersMessage ? 1 : 0
Behavior on opacity{
NumberAnimation { duration: 2*root.durationTime*container.animationTime }
NumberAnimation { duration: 2*root.durationTime*appletItem.animationTime }
}
PlasmaExtras.Heading {
@ -602,7 +602,7 @@ Item {
//! only to support springloading for plasma 5.10
//! also on this is based the tooltips behavior by enabling it
//! plasma tooltips are disabled
visible: applet && !container.latteApplet && !lockZoom && canBeHovered && !(container.isSeparator && !root.editMode) //&& (root.zoomFactor>1)
visible: applet && !appletItem.latteApplet && !lockZoom && canBeHovered && !(appletItem.isSeparator && !root.editMode) //&& (root.zoomFactor>1)
property bool blockWheel: false
property bool pressed: false
@ -613,7 +613,7 @@ Item {
}
onEntered: {
if (containsMouse && !container.lockZoom && container.canBeHovered){
if (containsMouse && !appletItem.lockZoom && appletItem.canBeHovered){
root.stopCheckRestoreZoomTimer();
}
@ -621,7 +621,7 @@ Item {
restoreAnimation.stop();
}
root.showTooltipLabel(container, applet.title);
root.showTooltipLabel(appletItem, applet.title);
//console.log("entered applet:" + layoutsContainer.hoveredIndex);
@ -712,7 +712,7 @@ Item {
}
onPressed: {
container.activateAppletForNeutralAreas(mouse);
appletItem.activateAppletForNeutralAreas(mouse);
pressed = true;
//! this is needed for some applets is order to be activated/deactivated correctly
@ -813,7 +813,7 @@ Item {
target: wrapper
property: "zoomScale"
to: 1
duration: 4 * container.animationTime
duration: 4 * appletItem.animationTime
easing.type: Easing.InCubic
}
@ -821,7 +821,7 @@ Item {
target: hiddenSpacerLeft
property: "nScale"
to: 0
duration: 4 * container.animationTime
duration: 4 * appletItem.animationTime
easing.type: Easing.InCubic
}
@ -829,7 +829,7 @@ Item {
target: hiddenSpacerRight
property: "nScale"
to: 0
duration: 4 * container.animationTime
duration: 4 * appletItem.animationTime
easing.type: Easing.InCubic
}
}

@ -30,13 +30,13 @@ Item{
height: root.isHorizontal ? wrapper.height : nHiddenSize
///check also if this is the first/last plasmoid in anylayout
visible: (rightSpacer ? container.endEdge : container.startEdge) || separatorSpace>0
visible: (rightSpacer ? appletItem.endEdge : appletItem.startEdge) || separatorSpace>0
property bool neighbourSeparator: false;
property int separatorSpace: neighbourSeparator && !container.isSeparator && !container.latteApplet ? (2+root.iconMargin/2) : 0
property int separatorSpace: neighbourSeparator && !appletItem.isSeparator && !appletItem.latteApplet ? (2+root.iconMargin/2) : 0
property real nHiddenSize: (nScale > 0) ? (container.spacersMaxSize * nScale) + separatorSpace : separatorSpace
property real nHiddenSize: (nScale > 0) ? (appletItem.spacersMaxSize * nScale) + separatorSpace : separatorSpace
property bool rightSpacer: false
@ -45,7 +45,7 @@ Item{
Behavior on nHiddenSize {
id: animatedBehavior
enabled: !root.globalDirectRender || restoreAnimation.running
NumberAnimation { duration: 3 * container.animationTime }
NumberAnimation { duration: 3 * appletItem.animationTime }
}
Behavior on nHiddenSize {

@ -34,10 +34,10 @@ Item{
id: wrapper
width: {
if (container.isInternalViewSplitter && !root.editMode)
if (appletItem.isInternalViewSplitter && !root.editMode)
return 0;
if (container.isSeparator && !root.editMode) {
if (appletItem.isSeparator && !root.editMode) {
if (!root.isVertical)
return -1;
else
@ -45,26 +45,26 @@ Item{
}
//! width for applets that use fillWidth/fillHeight such plasma taskmanagers and AWC
if (container.needsFillSpace && root.isHorizontal) {
if (appletItem.needsFillSpace && root.isHorizontal) {
if (root.panelAlignment !== Latte.Types.Justify) {
var maximumValue = (applet.Layout.maximumWidth === Infinity) || applet.Layout.maximumWidth === -1 ?
container.sizeForFill : Math.min(container.sizeForFill, applet.Layout.maximumWidth);
appletItem.sizeForFill : Math.min(appletItem.sizeForFill, applet.Layout.maximumWidth);
var constrainedWidth = MathTools.bound(applet.Layout.minimumWidth, applet.Layout.preferredWidth, maximumValue);
return root.editMode ? Math.max(constrainedWidth, root.iconSize) : constrainedWidth;
}
if(container.sizeForFill>-1){
return container.sizeForFill;
if(appletItem.sizeForFill>-1){
return appletItem.sizeForFill;
}
}
if (container.latteApplet) {
if (appletItem.latteApplet) {
//! commented because it was breaking the context menu available area, I don't remember where
//! we needed this...
// if (container.showZoomed && root.isVertical)
// if (appletItem.showZoomed && root.isVertical)
// return root.statesLineSize + root.thickMargin + root.iconSize + 1;
//else
return latteApplet.tasksWidth;
@ -74,10 +74,10 @@ Item{
}
height: {
if (container.isInternalViewSplitter && !root.editMode)
if (appletItem.isInternalViewSplitter && !root.editMode)
return 0;
if (container.isSeparator && !root.editMode) {
if (appletItem.isSeparator && !root.editMode) {
if (root.isVertical)
return -1;
else
@ -85,26 +85,26 @@ Item{
}
//! height for applets that use fillWidth/fillHeight such plasma taskmanagers and AWC
if (container.needsFillSpace && root.isVertical) {
if (appletItem.needsFillSpace && root.isVertical) {
if (root.panelAlignment !== Latte.Types.Justify) {
var maximumValue = (applet.Layout.maximumHeight === Infinity) || applet.Layout.maximumHeight === -1 ?
container.sizeForFill : Math.min(container.sizeForFill, applet.Layout.maximumHeight);
appletItem.sizeForFill : Math.min(appletItem.sizeForFill, applet.Layout.maximumHeight);
var constrainedHeight = MathTools.bound(applet.Layout.minimumHeight, applet.Layout.preferredHeight, maximumValue);
return root.editMode ? Math.max(constrainedHeight, root.iconSize) : constrainedHeight;
}
if (container.sizeForFill>-1){
return container.sizeForFill;
if (appletItem.sizeForFill>-1){
return appletItem.sizeForFill;
}
}
if (container.latteApplet) {
if (appletItem.latteApplet) {
//! commented because it was breaking the context menu available area, I don't remember where
//! we needed this...
//if (container.showZoomed && root.isHorizontal)
//if (appletItem.showZoomed && root.isHorizontal)
// return root.statesLineSize + root.thickMargin + root.iconSize + 1;
// else
return latteApplet.tasksHeight;
@ -115,9 +115,9 @@ Item{
opacity: appletColorizer.mustBeShown ? 0 : 1
//width: container.isInternalViewSplitter && !root.editMode ? 0 : Math.round( latteApplet ? ((container.showZoomed && root.isVertical) ?
//width: appletItem.isInternalViewSplitter && !root.editMode ? 0 : Math.round( latteApplet ? ((appletItem.showZoomed && root.isVertical) ?
// scaledWidth : latteApplet.tasksWidth) : scaledWidth )
//height: container.isInternalViewSplitter&& !root.editMode ? 0 : Math.round( latteApplet ? ((container.showZoomed && root.isHorizontal) ?
//height: appletItem.isInternalViewSplitter&& !root.editMode ? 0 : Math.round( latteApplet ? ((appletItem.showZoomed && root.isHorizontal) ?
// scaledHeight : latteApplet.tasksHeight ): scaledHeight )
property bool disableScaleWidth: false
@ -136,11 +136,11 @@ Item{
property int iconSize: root.iconSize
property int marginWidth: root.isVertical ?
(container.isSystray ? root.thickMarginBase : root.thickMargin ) :
(root.inFullJustify && (container.firstChildOfStartLayout || container.lastChildOfEndLayout ) ? 0 : root.iconMargin) //Fitt's Law
(appletItem.isSystray ? root.thickMarginBase : root.thickMargin ) :
(root.inFullJustify && (appletItem.firstChildOfStartLayout || appletItem.lastChildOfEndLayout ) ? 0 : root.iconMargin) //Fitt's Law
property int marginHeight: root.isHorizontal ?
(container.isSystray ? root.thickMarginBase : root.thickMargin ) :
(root.inFullJustify && (container.firstChildOfStartLayout || container.lastChildOfEndLayout ) ? 0 : root.iconMargin) //Fitt's Law
(appletItem.isSystray ? root.thickMarginBase : root.thickMargin ) :
(root.inFullJustify && (appletItem.firstChildOfStartLayout || appletItem.lastChildOfEndLayout ) ? 0 : root.iconMargin) //Fitt's Law
property real scaledWidth: zoomScaleWidth * (layoutWidth + marginWidth)
property real scaledHeight: zoomScaleHeight * (layoutHeight + marginHeight)
@ -155,15 +155,15 @@ Item{
// property int localMoreSpace: root.reverseLinesPosition ? root.statesLineSize + 2 : appletMargin
property int localMoreSpace: appletMargin
property int moreHeight: (container.isSystray || root.reverseLinesPosition)
property int moreHeight: (appletItem.isSystray || root.reverseLinesPosition)
&& root.isHorizontal ? localMoreSpace : 0
property int moreWidth: (container.isSystray || root.reverseLinesPosition)
property int moreWidth: (appletItem.isSystray || root.reverseLinesPosition)
&& root.isVertical ? localMoreSpace : 0
property real center:(width + hiddenSpacerLeft.separatorSpace + hiddenSpacerRight.separatorSpace) / 2
property real zoomScale: 1
property int index: container.index
property int index: appletItem.index
property Item wrapperContainer: _wrapperContainer
property Item clickedEffect: _clickedEffect
@ -239,14 +239,14 @@ Item{
root.setGlobalDirectRender(true);
}
if ((zoomScale > 1) && !container.isZoomed) {
container.isZoomed = true;
if ((zoomScale > 1) && !appletItem.isZoomed) {
appletItem.isZoomed = true;
if (!root.editMode && !animationWasSent) {
root.slotAnimationsNeedBothAxis(1);
animationWasSent = true;
}
} else if ((zoomScale == 1) && container.isZoomed) {
container.isZoomed = false;
} else if ((zoomScale == 1) && appletItem.isZoomed) {
appletItem.isZoomed = false;
if (animationWasSent) {
root.slotAnimationsNeedBothAxis(-1);
animationWasSent = false;
@ -257,7 +257,7 @@ Item{
Connections {
target: root
onIsVerticalChanged: {
if (container.latteApplet) {
if (appletItem.latteApplet) {
return;
}
@ -275,14 +275,14 @@ Item{
}
function updateLayoutHeight(){
if (container.needsFillSpace && root.isVertical) {
if (appletItem.needsFillSpace && root.isVertical) {
layoutsContainer.updateSizeForAppletsInFill();
return;
}
if (isLattePlasmoid) {
return;
} else if (container.isInternalViewSplitter){
} else if (appletItem.isInternalViewSplitter){
if(!root.editMode)
layoutHeight = 0;
else
@ -291,7 +291,7 @@ Item{
else if(applet && applet.pluginName === "org.kde.plasma.panelspacer"){
layoutHeight = root.iconSize + moreHeight;
}
else if(container.isSystray && root.isHorizontal){
else if(appletItem.isSystray && root.isHorizontal){
layoutHeight = root.statesLineSize + root.iconSize;
}
else{
@ -301,12 +301,12 @@ Item{
else if(applet
&& ( applet.Layout.maximumHeight < root.iconSize
|| applet.Layout.preferredHeight > root.iconSize
|| container.lockZoom)
|| appletItem.lockZoom)
&& root.isVertical
&& !disableScaleWidth
&& !communicator.overlayLatteIconIsActive) {
if (!container.isSpacer) {
if (!appletItem.isSpacer) {
disableScaleHeight = true;
}
//this way improves performance, probably because during animation the preferred sizes update a lot
@ -315,7 +315,7 @@ Item{
} else if (applet.Layout.minimumHeight > root.iconSize){
layoutHeight = applet.Layout.minimumHeight;
} else if ((applet.Layout.preferredHeight > root.iconSize)
|| (container.lockZoom && applet.Layout.preferredHeight > 0 )){
|| (appletItem.lockZoom && applet.Layout.preferredHeight > 0 )){
layoutHeight = applet.Layout.preferredHeight;
} else{
layoutHeight = root.iconSize + moreHeight;
@ -327,14 +327,14 @@ Item{
}
function updateLayoutWidth(){
if (container.needsFillSpace && root.isHorizontal) {
if (appletItem.needsFillSpace && root.isHorizontal) {
layoutsContainer.updateSizeForAppletsInFill();
return;
}
if (isLattePlasmoid) {
return;
} else if (container.isInternalViewSplitter){
} else if (appletItem.isInternalViewSplitter){
if(!root.editMode)
layoutWidth = 0;
else
@ -343,7 +343,7 @@ Item{
else if(applet && applet.pluginName === "org.kde.plasma.panelspacer"){
layoutWidth = root.iconSize + moreWidth;
}
else if(container.isSystray && root.isVertical){
else if(appletItem.isSystray && root.isVertical){
layoutWidth = root.statesLineSize + root.iconSize;
}
else{
@ -353,12 +353,12 @@ Item{
else if(applet
&& ( applet.Layout.maximumWidth < root.iconSize
|| applet.Layout.preferredWidth > root.iconSize
|| container.lockZoom)
|| appletItem.lockZoom)
&& root.isHorizontal
&& !disableScaleHeight
&& !communicator.overlayLatteIconIsActive){
if (!container.isSpacer) {
if (!appletItem.isSpacer) {
disableScaleWidth = true;
}
//this way improves performance, probably because during animation the preferred sizes update a lot
@ -368,7 +368,7 @@ Item{
} else if (applet.Layout.minimumWidth > root.iconSize){
layoutWidth = applet.Layout.minimumWidth;
} else if ((applet.Layout.preferredWidth > root.iconSize)
|| (container.lockZoom && applet.Layout.preferredWidth > 0 )){
|| (appletItem.lockZoom && applet.Layout.preferredWidth > 0 )){
layoutWidth = applet.Layout.preferredWidth;
} else{
layoutWidth = root.iconSize + moreWidth;
@ -383,29 +383,29 @@ Item{
id:_wrapperContainer
width:{
if (container.needsFillSpace && (container.sizeForFill>-1) && root.isHorizontal){
if (appletItem.needsFillSpace && (appletItem.sizeForFill>-1) && root.isHorizontal){
return wrapper.width;
}
if (container.isInternalViewSplitter)
if (appletItem.isInternalViewSplitter)
return wrapper.layoutWidth;
else
return parent.zoomScaleWidth * wrapper.layoutWidth;
}
height:{
if (container.needsFillSpace && (container.sizeForFill>-1) && root.isVertical){
if (appletItem.needsFillSpace && (appletItem.sizeForFill>-1) && root.isVertical){
return wrapper.height;
}
if (container.isInternalViewSplitter)
if (appletItem.isInternalViewSplitter)
return wrapper.layoutHeight;
else
return parent.zoomScaleHeight * wrapper.layoutHeight;
}
//width: Math.round( container.isInternalViewSplitter ? wrapper.layoutWidth : parent.zoomScaleWidth * wrapper.layoutWidth )
//height: Math.round( container.isInternalViewSplitter ? wrapper.layoutHeight : parent.zoomScaleHeight * wrapper.layoutHeight )
//width: Math.round( appletItem.isInternalViewSplitter ? wrapper.layoutWidth : parent.zoomScaleWidth * wrapper.layoutWidth )
//height: Math.round( appletItem.isInternalViewSplitter ? wrapper.layoutHeight : parent.zoomScaleHeight * wrapper.layoutHeight )
anchors.rightMargin: plasmoid.location === PlasmaCore.Types.RightEdge ? lowThickUsed : 0
anchors.leftMargin: plasmoid.location === PlasmaCore.Types.LeftEdge ? lowThickUsed : 0
@ -549,7 +549,7 @@ Item{
Loader{
anchors.fill: _wrapperContainer
active: container.isInternalViewSplitter && root.editMode
active: appletItem.isInternalViewSplitter && root.editMode
rotation: root.isVertical ? 90 : 0
@ -586,11 +586,11 @@ Item{
///Shadow in applets
Loader{
id: appletShadow
anchors.fill: container.appletWrapper
anchors.fill: appletItem.appletWrapper
active: container.applet && !appletColorizer.mustBeShown
active: appletItem.applet && !appletColorizer.mustBeShown
&& (((plasmoid.configuration.shadows === 1 /*Locked Applets*/
&& (!container.canBeHovered || (container.lockZoom && (applet.pluginName !== root.plasmoidName))) )
&& (!appletItem.canBeHovered || (appletItem.lockZoom && (applet.pluginName !== root.plasmoidName))) )
|| (plasmoid.configuration.shadows === 2 /*All Applets*/
&& (applet.pluginName !== root.plasmoidName)))
|| (root.forceTransparentPanel && plasmoid.configuration.shadows>0 && applet.pluginName !== root.plasmoidName)) /*on forced transparent state*/
@ -608,7 +608,7 @@ Item{
color: root.appShadowColor //"#ff080808"
fast: true
samples: 2 * radius
source: communicator.overlayLatteIconIsActive ? _wrapperContainer : container.applet
source: communicator.overlayLatteIconIsActive ? _wrapperContainer : appletItem.applet
radius: shadowSize
verticalOffset: forcedShadow ? 0 : 2
@ -644,7 +644,7 @@ Item{
/// START Applets Number
Loader{
id: appletNumberLoader
anchors.fill: container.appletWrapper
anchors.fill: appletItem.appletWrapper
active: isValidDelayer > 0
asynchronous: true
visible: badgeString!==""
@ -660,7 +660,7 @@ Item{
Component.onCompleted: fixedIndex = parabolicManager.pseudoAppletIndex(index);
property real isValidDelayer: container.canShowAppletNumberBadge &&
property real isValidDelayer: appletItem.canShowAppletNumberBadge &&
((root.showAppletsNumbers && root.unifiedGlobalShortcuts)
|| (root.showMetaBadge && applet.id===applicationLauncherId)) ? 1 : 0
@ -741,7 +741,7 @@ Item{
color: "transparent"
//! red visualizer, in debug mode for the applets that use fillWidth or fillHeight
//! green, for the rest
border.color: (container.needsFillSpace && (container.sizeForFill>-1) && root.isHorizontal) ? "red" : "green"
border.color: (appletItem.needsFillSpace && (appletItem.sizeForFill>-1) && root.isHorizontal) ? "red" : "green"
border.width: 1
}
}
@ -749,7 +749,7 @@ Item{
Behavior on zoomScale {
enabled: !root.globalDirectRender
NumberAnimation {
duration: 3 * container.animationTime
duration: 3 * appletItem.animationTime
easing.type: Easing.OutCubic
}
}
@ -779,12 +779,12 @@ Item{
}*/
//Left hiddenSpacer
if(container.startEdge){
if(appletItem.startEdge){
hiddenSpacerLeft.nScale = scales.leftScale - 1;
}
//Right hiddenSpacer ///there is one more item in the currentLayout ????
if(container.endEdge){
if(appletItem.endEdge){
hiddenSpacerRight.nScale = scales.rightScale - 1;
}
@ -795,12 +795,12 @@ Item{
function signalUpdateScale(nIndex, nScale, step){
if(container && !container.containsMouse && (container.index === nIndex)){
if ( ((canBeHovered && !lockZoom ) || container.latteApplet)
if(appletItem && !appletItem.containsMouse && (appletItem.index === nIndex)){
if ( ((canBeHovered && !lockZoom ) || appletItem.latteApplet)
&& (applet && applet.status !== PlasmaCore.Types.HiddenStatus)
//&& (index != currentLayout.hoveredIndex)
){
if(!container.latteApplet){
if(!appletItem.latteApplet){
if(nScale >= 0)
zoomScale = nScale + step;
else

@ -79,7 +79,7 @@ Item{
//! BEGIN OF CONNECTIONS
Connections{
target: container
target: appletItem
onAppletChanged: {
if (applet) {
AppletIdentifier.checkAndUpdateAppletRootItem();

Loading…
Cancel
Save