forked from Shinonome/dots-hyprland
34 lines
1000 B
QML
34 lines
1000 B
QML
import "root:/modules/common"
|
|
import QtQuick
|
|
import Quickshell
|
|
|
|
/**
|
|
* Recreation of GTK revealer. Expects one single child.
|
|
*/
|
|
Item {
|
|
id: root
|
|
property bool reveal
|
|
property bool vertical: false
|
|
clip: true
|
|
|
|
implicitWidth: (reveal || vertical) ? childrenRect.width : 0
|
|
implicitHeight: (reveal || !vertical) ? childrenRect.height : 0
|
|
|
|
Behavior on implicitWidth {
|
|
enabled: !vertical
|
|
NumberAnimation {
|
|
duration: Appearance.animation.elementMoveEnter.duration
|
|
easing.type: Appearance.animation.elementMoveEnter.type
|
|
easing.bezierCurve: Appearance.animation.elementMoveEnter.bezierCurve
|
|
}
|
|
}
|
|
Behavior on implicitHeight {
|
|
enabled: vertical
|
|
NumberAnimation {
|
|
duration: Appearance.animation.elementMoveEnter.duration
|
|
easing.type: Appearance.animation.elementMoveEnter.type
|
|
easing.bezierCurve: Appearance.animation.elementMoveEnter.bezierCurve
|
|
}
|
|
}
|
|
}
|