Files
illogical-impulse/dots/.config/quickshell/ii/modules/common/widgets/Revealer.qml
T
2026-04-03 18:50:44 +02:00

26 lines
743 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 || (implicitWidth > 0 && !vertical) || (implicitHeight > 0 && vertical)
Behavior on implicitWidth {
enabled: !vertical
animation: Appearance.animation.elementMoveEnter.numberAnimation.createObject(this)
}
Behavior on implicitHeight {
enabled: vertical
animation: Appearance.animation.elementMoveEnter.numberAnimation.createObject(this)
}
}