@@ -412,16 +412,20 @@ MouseArea {
412412 }
413413 return Math .min ((task .childCount === 0 ) ? 1 : task .childCount , maxStates);
414414 }
415- readonly property int maxStates: isMetro ? 2 : 4
415+ readonly property int maxStates: plasmoid . configuration . indicatorLimit
416416
417417 Rectangle{
418418 id: stateRect
419+ Behavior on height { PropertyAnimation {} }
420+ Behavior on width { PropertyAnimation {} }
421+ Behavior on color { PropertyAnimation {} }
422+ Behavior on radius { PropertyAnimation {} }
419423 readonly property color decoColor: frame .dominantColor
420- readonly property int maxStates: isMetro ? 2 : 4
424+ readonly property int maxStates: plasmoid . configuration . indicatorLimit
421425 readonly property bool isFirst: index === 0
422426 readonly property int adjust: plasmoid .configuration .indicatorShrink
423427 readonly property int indicatorLength: plasmoid .configuration .indicatorLength
424- readonly property int spacing: PlasmaCore .Units .smallSpacing / 2
428+ readonly property int spacing: PlasmaCore .Units .smallSpacing
425429 readonly property bool isVertical: {
426430 if (plasmoid .formFactor === PlasmaCore .Types .Vertical && ! plasmoid .configuration .indicatorOverride )
427431 return true ;
@@ -441,6 +445,7 @@ MouseArea {
441445 var parentSize = ! isVertical ? frame .width : frame .height ;
442446 var indicatorComputedSize;
443447 var adjustment = isFirst ? adjust : 0
448+ var parentSpacingAdjust = task .childCount >= 1 && maxStates >= 2 ? spacing * 3 : 0 // Spacing fix for multiple items
444449 if (plasmoid .configuration .indicatorDominantColor ){
445450 colorEval = decoColor
446451 }
@@ -451,15 +456,22 @@ MouseArea {
451456 colorEval = plasmoid .configuration .indicatorCustomColor
452457 }
453458 if (isFirst){// compute the size
459+ var growFactor = plasmoid .configuration .indicatorGrowFactor / 100
460+ if (plasmoid .configuration .indicatorGrow && task .state === " minimized" ) {
461+ var mainSize = indicatorLength * growFactor;
462+ }
463+ else {
464+ var mainSize = (parentSize + parentSpacingAdjust);
465+ }
454466 switch (plasmoid .configuration .indicatorStyle ){
455467 case 0 :
456- indicatorComputedSize = parentSize - (Math .min (task .childCount , maxStates) * (( spacing + indicatorLength) / 2 ) + adjust)
468+ indicatorComputedSize = mainSize - (Math .min (task .childCount , maxStates === 1 ? 0 : maxStates ) * (spacing + indicatorLength)) - adjust
457469 break
458470 case 1 :
459- indicatorComputedSize = parentSize - (Math .min (task .childCount , maxStates) * (( spacing + indicatorLength)) + adjust)
471+ indicatorComputedSize = mainSize - (Math .min (task .childCount , maxStates === 1 ? 0 : maxStates ) * (spacing + indicatorLength)) - adjust
460472 break
461473 case 2 :
462- indicatorComputedSize = indicatorLength
474+ indicatorComputedSize = plasmoid . configuration . indicatorGrow && task . state !== " minimized " ? indicatorLength * growFactor : indicatorLength
463475 break
464476 default :
465477 break
@@ -476,6 +488,10 @@ MouseArea {
476488 width = plasmoid .configuration .indicatorSize
477489 height = indicatorComputedSize
478490 }
491+ if (plasmoid .configuration .indicatorDesaturate && task .state === " minimized" ) {
492+ var colorHSL = hexToHSL (colorEval)
493+ colorCalc = Qt .hsla (colorHSL .h , 0.2 , 0.6 , 1 )
494+ }
479495 if (! isFirst && plasmoid .configuration .indicatorStyle === 0 ) {// Metro specific handling
480496 colorCalc = Qt .darker (colorEval, 1.2 )
481497 }
0 commit comments