This repository has been archived on 2026-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
2022-06-22 18:07:55 +02:00

44 lines
1.1 KiB
QML

import QtQuick 2.3
import QtGraphicalEffects 1.0
import Nymea 1.0
Item {
id: root
property alias backgroundItem: blurEffectSource.sourceItem
property alias backgroundRect: blurEffectSource.sourceRect
Behavior on x { NumberAnimation { duration: Style.animationDuration } }
Behavior on y { NumberAnimation { duration: Style.animationDuration } }
Behavior on width { NumberAnimation { duration: Style.animationDuration } }
Behavior on height { NumberAnimation { duration: Style.animationDuration } }
Rectangle {
id: blurSource
anchors.fill: parent
color: Style.backgroundColor
visible: false
radius: Style.smallCornerRadius
ShaderEffectSource {
id: blurEffectSource
anchors.fill: parent
}
}
FastBlur {
anchors.fill: parent
source: blurSource
radius: 32
visible: root.visible
}
Rectangle {
anchors.fill: parent
color: Style.tooltipBackgroundColor
opacity: .5
radius: Style.smallCornerRadius
}
}