@@ -25,6 +25,25 @@ PlasmoidItem {
25
25
property int panelLayoutCount: panelLayout? .children ? .length || 0
26
26
property int trayGridViewCount: trayGridView? .count || 0
27
27
property int trayGridViewCountOld: 0
28
+ property var panelPosition: {
29
+ var location
30
+ var screen = main .screen
31
+ switch (plasmoid .location ) {
32
+ case PlasmaCore .Types .TopEdge :
33
+ location = " top"
34
+ break
35
+ case PlasmaCore .Types .BottomEdge :
36
+ location = " bottom"
37
+ break
38
+ case PlasmaCore .Types .LeftEdge :
39
+ location = " left"
40
+ break
41
+ case PlasmaCore .Types .RightEdge :
42
+ location = " right"
43
+ break
44
+ }
45
+ return { screen , location }
46
+ }
28
47
property bool horizontal: Plasmoid .formFactor === PlasmaCore .Types .Horizontal
29
48
property bool editMode: Plasmoid .containment .corona ? .editMode ?? false
30
49
property bool onDesktop: plasmoid .location === PlasmaCore .Types .Floating
@@ -1471,6 +1490,7 @@ PlasmoidItem {
1471
1490
onTriggered: {
1472
1491
Plasmoid .activated ()
1473
1492
main .expanded = false
1493
+ bindPlasmoidStatusTimer .restart ()
1474
1494
}
1475
1495
}
1476
1496
@@ -1485,13 +1505,16 @@ PlasmoidItem {
1485
1505
// X11 doesn't seem to need it and also would flicker the panel/screen
1486
1506
dbusKWinReconfigure .call ()
1487
1507
}
1488
- if ([" autohide" , " dodgewindows" ].includes (stockPanelSettings .visibility .value )) {
1508
+
1509
+ Plasmoid .status = hideWidget ? PlasmaCore .Types .ActiveStatus : PlasmaCore .Types .HiddenStatus
1510
+ if ([" autohide" , " dodgewindows" ].includes (stockPanelSettings .visibility .value ) && panelPosition .location !== stockPanelSettings .position .value ) {
1489
1511
// activate the panel for a longer time if it can hide
1490
1512
// to avoid plasma crash when changing its location
1491
1513
tempActivationTimer .restart ()
1492
1514
} else {
1493
1515
Plasmoid .activated ()
1494
1516
Plasmoid .activated ()
1517
+ bindPlasmoidStatus ()
1495
1518
}
1496
1519
}
1497
1520
@@ -1593,6 +1616,7 @@ PlasmoidItem {
1593
1616
}
1594
1617
1595
1618
Component .onCompleted : {
1619
+ bindPlasmoidStatus ()
1596
1620
Qt .callLater (function () {
1597
1621
const config = Utils .mergeConfigs (Globals .defaultConfig , cfg)
1598
1622
plasmoid .configuration .globalSettings = Utils .stringify (config)
@@ -1684,9 +1708,17 @@ PlasmoidItem {
1684
1708
}
1685
1709
toolTipTextFormat: Text .PlainText
1686
1710
1687
- Plasmoid .status : (editMode || ! hideWidget) ?
1688
- PlasmaCore .Types .ActiveStatus :
1689
- PlasmaCore .Types .HiddenStatus
1711
+ function bindPlasmoidStatus () {
1712
+ Plasmoid .status = Qt .binding (function () {return (editMode || ! hideWidget) ? PlasmaCore .Types .ActiveStatus : PlasmaCore .Types .HiddenStatus })
1713
+ }
1714
+
1715
+ Timer {
1716
+ id: bindPlasmoidStatusTimer
1717
+ interval: 600
1718
+ onTriggered: {
1719
+ bindPlasmoidStatus ()
1720
+ }
1721
+ }
1690
1722
1691
1723
Plasmoid .contextualActions : [
1692
1724
PlasmaCore .Action {
0 commit comments