mirror of
https://github.com/danbulant/dots-hyprland
synced 2026-05-24 12:22:09 +00:00
25 lines
700 B
QML
25 lines
700 B
QML
import qs.modules.common
|
|
import QtQuick
|
|
|
|
/**
|
|
* 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: reveal || (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)
|
|
}
|
|
}
|