1
+ pragma ComponentBehavior : Bound
2
+
1
3
import QtCore
2
4
import QtQuick
3
5
import QtQuick.Controls
@@ -67,6 +69,9 @@ PlasmoidItem {
67
69
property Item trayWidgetBgItem
68
70
property string lastPreset
69
71
property var presetContent: " "
72
+ property bool animatePropertyChanges: plasmoid .configuration .animatePropertyChanges
73
+ property int animationDuration: plasmoid .configuration .animationDuration
74
+ property int animationEasingType: Easing .OutCubic
70
75
property var panelState: {
71
76
" fullscreenWindow" : tasksModel .fullscreenExists ,
72
77
" maximized" : tasksModel .maximizedExists ,
@@ -461,6 +466,35 @@ PlasmoidItem {
461
466
bottomRightRadius: bottomRightRadius
462
467
}
463
468
469
+ Behavior on topLeftRadius {
470
+ enabled: animatePropertyChanges
471
+ NumberAnimation {
472
+ duration: main .animationDuration
473
+ easing .type : main .animationEasingType
474
+ }
475
+ }
476
+ Behavior on topRightRadius {
477
+ enabled: animatePropertyChanges
478
+ NumberAnimation {
479
+ duration: main .animationDuration
480
+ easing .type : main .animationEasingType
481
+ }
482
+ }
483
+ Behavior on bottomLeftRadius {
484
+ enabled: animatePropertyChanges
485
+ NumberAnimation {
486
+ duration: main .animationDuration
487
+ easing .type : main .animationEasingType
488
+ }
489
+ }
490
+ Behavior on bottomRightRadius {
491
+ enabled: animatePropertyChanges
492
+ NumberAnimation {
493
+ duration: main .animationDuration
494
+ easing .type : main .animationEasingType
495
+ }
496
+ }
497
+
464
498
color: {
465
499
if (bgEnabled) {
466
500
return getColor (bgColorCfg, targetIndex, null , itemType, bgColorHolder)
@@ -469,6 +503,14 @@ PlasmoidItem {
469
503
}
470
504
}
471
505
506
+ Behavior on color {
507
+ enabled: animatePropertyChanges
508
+ ColorAnimation {
509
+ duration: main .animationDuration
510
+ easing .type : main .animationEasingType
511
+ }
512
+ }
513
+
472
514
property int targetChildren: target .children .length
473
515
onTargetChildrenChanged: {
474
516
// console.error("CHILDREN CHANGED", targetChildren, target)
@@ -531,6 +573,20 @@ PlasmoidItem {
531
573
532
574
height: isTray ? target .height : parent .height
533
575
width: isTray ? target .width : parent .width
576
+ Behavior on height {
577
+ enabled: animatePropertyChanges
578
+ NumberAnimation {
579
+ duration: main .animationDuration
580
+ easing .type : main .animationEasingType
581
+ }
582
+ }
583
+ Behavior on width {
584
+ enabled: animatePropertyChanges
585
+ NumberAnimation {
586
+ duration: main .animationDuration
587
+ easing .type : main .animationEasingType
588
+ }
589
+ }
534
590
anchors .centerIn : (isTray || isTrayArrow) ? parent : undefined
535
591
anchors .fill : (isPanel || isTray || isTrayArrow) ? parent : undefined
536
592
@@ -551,6 +607,21 @@ PlasmoidItem {
551
607
+ extraBSpacing
552
608
property int verticalWidth: marginTop + marginBottom
553
609
610
+ Behavior on horizontalWidth {
611
+ enabled: animatePropertyChanges
612
+ NumberAnimation {
613
+ duration: main .animationDuration
614
+ easing .type : main .animationEasingType
615
+ }
616
+ }
617
+ Behavior on verticalWidth {
618
+ enabled: animatePropertyChanges
619
+ NumberAnimation {
620
+ duration: main .animationDuration
621
+ easing .type : main .animationEasingType
622
+ }
623
+ }
624
+
554
625
Binding {
555
626
target: rect
556
627
property: " x"
@@ -727,6 +798,14 @@ PlasmoidItem {
727
798
return getColor (borderColorCfg, targetIndex, rect .color , itemType, borderRec)
728
799
}
729
800
801
+ Behavior on borderColor {
802
+ enabled: animatePropertyChanges
803
+ ColorAnimation {
804
+ duration: main .animationDuration
805
+ easing .type : main .animationEasingType
806
+ }
807
+ }
808
+
730
809
Rectangle {
731
810
id: customBorderTop
732
811
width: parent .width
@@ -846,6 +925,35 @@ PlasmoidItem {
846
925
}
847
926
xOffset: bgShadow .xOffset
848
927
yOffset: bgShadow .yOffset
928
+
929
+ Behavior on size {
930
+ enabled: animatePropertyChanges
931
+ NumberAnimation {
932
+ duration: main .animationDuration
933
+ easing .type : main .animationEasingType
934
+ }
935
+ }
936
+ Behavior on xOffset {
937
+ enabled: animatePropertyChanges
938
+ NumberAnimation {
939
+ duration: main .animationDuration
940
+ easing .type : main .animationEasingType
941
+ }
942
+ }
943
+ Behavior on yOffset {
944
+ enabled: animatePropertyChanges
945
+ NumberAnimation {
946
+ duration: main .animationDuration
947
+ easing .type : main .animationEasingType
948
+ }
949
+ }
950
+ Behavior on color {
951
+ enabled: animatePropertyChanges
952
+ ColorAnimation {
953
+ duration: main .animationDuration
954
+ easing .type : main .animationEasingType
955
+ }
956
+ }
849
957
}
850
958
851
959
// paddingRect to hide the shadow in one or two sides Qt.rect(left,top,right,bottom)
@@ -890,6 +998,34 @@ PlasmoidItem {
890
998
}
891
999
source: target .applet
892
1000
visible: fgShadowEnabled
1001
+ Behavior on color {
1002
+ enabled: animatePropertyChanges
1003
+ ColorAnimation {
1004
+ duration: main .animationDuration
1005
+ easing .type : main .animationEasingType
1006
+ }
1007
+ }
1008
+ Behavior on radius {
1009
+ enabled: animatePropertyChanges
1010
+ NumberAnimation {
1011
+ duration: main .animationDuration
1012
+ easing .type : main .animationEasingType
1013
+ }
1014
+ }
1015
+ Behavior on horizontalOffset {
1016
+ enabled: animatePropertyChanges
1017
+ NumberAnimation {
1018
+ duration: main .animationDuration
1019
+ easing .type : main .animationEasingType
1020
+ }
1021
+ }
1022
+ Behavior on verticalOffset {
1023
+ enabled: animatePropertyChanges
1024
+ NumberAnimation {
1025
+ duration: main .animationDuration
1026
+ easing .type : main .animationEasingType
1027
+ }
1028
+ }
893
1029
}
894
1030
895
1031
property real blurMaskX: {
@@ -1195,6 +1331,14 @@ PlasmoidItem {
1195
1331
Utils .panelOpacity (panelElement, isEnabled, nativePanelBackgroundOpacity)
1196
1332
}
1197
1333
1334
+ Behavior on nativePanelBackgroundOpacity {
1335
+ enabled: animatePropertyChanges
1336
+ NumberAnimation {
1337
+ duration: main .animationDuration
1338
+ easing .type : main .animationEasingType
1339
+ }
1340
+ }
1341
+
1198
1342
onNativePanelBackgroundEnabledChanged: {
1199
1343
if (! containmentItem) return
1200
1344
Utils .toggleTransparency (containmentItem, nativePanelBackgroundEnabled)
0 commit comments