mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-13 01:02:18 -04:00
system tray: fix to take up 0 space when empty
This commit is contained in:
@@ -99,6 +99,44 @@ BasePill {
|
|||||||
property bool suppressShiftAnimation: false
|
property bool suppressShiftAnimation: false
|
||||||
readonly property bool hasHiddenItems: allTrayItems.length > mainBarItems.length
|
readonly property bool hasHiddenItems: allTrayItems.length > mainBarItems.length
|
||||||
visible: allTrayItems.length > 0
|
visible: allTrayItems.length > 0
|
||||||
|
opacity: allTrayItems.length > 0 ? 1 : 0
|
||||||
|
|
||||||
|
states: [
|
||||||
|
State {
|
||||||
|
name: "hidden_horizontal"
|
||||||
|
when: allTrayItems.length === 0 && !isVerticalOrientation
|
||||||
|
PropertyChanges {
|
||||||
|
target: root
|
||||||
|
width: 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
State {
|
||||||
|
name: "hidden_vertical"
|
||||||
|
when: allTrayItems.length === 0 && isVerticalOrientation
|
||||||
|
PropertyChanges {
|
||||||
|
target: root
|
||||||
|
height: 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
transitions: [
|
||||||
|
Transition {
|
||||||
|
NumberAnimation {
|
||||||
|
properties: "width,height"
|
||||||
|
duration: Theme.shortDuration
|
||||||
|
easing.type: Theme.standardEasing
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
Behavior on opacity {
|
||||||
|
NumberAnimation {
|
||||||
|
duration: Theme.shortDuration
|
||||||
|
easing.type: Theme.standardEasing
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
readonly property real trayItemSize: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground) + 6
|
readonly property real trayItemSize: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground) + 6
|
||||||
|
|
||||||
readonly property real minTooltipY: {
|
readonly property real minTooltipY: {
|
||||||
|
|||||||
Reference in New Issue
Block a user