forked from Shinonome/dots-hyprland
27 lines
711 B
QML
27 lines
711 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
|
|
visible: width > 0 && height > 0
|
|
|
|
Behavior on implicitWidth {
|
|
enabled: !vertical
|
|
animation: Appearance.animation.elementMoveEnter.numberAnimation.createObject(this)
|
|
}
|
|
Behavior on implicitHeight {
|
|
enabled: vertical
|
|
animation: Appearance.animation.elementMoveEnter.numberAnimation.createObject(this)
|
|
}
|
|
}
|