RibbonBlur: Add 'enableEffect' property.
This commit is contained in:
parent
c0a05c1a99
commit
1ce411be5e
|
@ -4,6 +4,7 @@ import RibbonUI 1.0
|
||||||
|
|
||||||
RibbonRectangle {
|
RibbonRectangle {
|
||||||
id: control
|
id: control
|
||||||
|
property bool enableEffect: true
|
||||||
property int blurRadius: 32
|
property int blurRadius: 32
|
||||||
property alias target: effect.sourceItem
|
property alias target: effect.sourceItem
|
||||||
property rect targetRect : Qt.rect(control.x, control.y, control.width, control.height)
|
property rect targetRect : Qt.rect(control.x, control.y, control.width, control.height)
|
||||||
|
@ -18,7 +19,7 @@ RibbonRectangle {
|
||||||
id: effect
|
id: effect
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
sourceRect: control.targetRect
|
sourceRect: control.targetRect
|
||||||
visible: false
|
visible: !enableEffect
|
||||||
}
|
}
|
||||||
|
|
||||||
GaussianBlur{
|
GaussianBlur{
|
||||||
|
@ -28,6 +29,7 @@ RibbonRectangle {
|
||||||
deviation: 8
|
deviation: 8
|
||||||
samples: (control.blurRadius / 4) * 3
|
samples: (control.blurRadius / 4) * 3
|
||||||
source: effect
|
source: effect
|
||||||
|
visible: enableEffect
|
||||||
}
|
}
|
||||||
|
|
||||||
RibbonRectangle{
|
RibbonRectangle{
|
||||||
|
|
|
@ -4,6 +4,7 @@ import RibbonUI
|
||||||
|
|
||||||
RibbonRectangle {
|
RibbonRectangle {
|
||||||
id: control
|
id: control
|
||||||
|
property bool enableEffect: true
|
||||||
property int blurRadius: 32
|
property int blurRadius: 32
|
||||||
property alias target: effect.sourceItem
|
property alias target: effect.sourceItem
|
||||||
property rect targetRect : Qt.rect(control.x, control.y, control.width, control.height)
|
property rect targetRect : Qt.rect(control.x, control.y, control.width, control.height)
|
||||||
|
@ -18,7 +19,7 @@ RibbonRectangle {
|
||||||
id: effect
|
id: effect
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
sourceRect: control.targetRect
|
sourceRect: control.targetRect
|
||||||
visible: false
|
visible: !enableEffect
|
||||||
}
|
}
|
||||||
|
|
||||||
GaussianBlur{
|
GaussianBlur{
|
||||||
|
@ -28,6 +29,7 @@ RibbonRectangle {
|
||||||
deviation: 8
|
deviation: 8
|
||||||
samples: (control.blurRadius / 4) * 3
|
samples: (control.blurRadius / 4) * 3
|
||||||
source: effect
|
source: effect
|
||||||
|
visible: enableEffect
|
||||||
}
|
}
|
||||||
|
|
||||||
RibbonRectangle{
|
RibbonRectangle{
|
||||||
|
|
Loading…
Reference in New Issue