diff options
author | Gunnar Sletta <gunnar.sletta@jollamobile.com> | 2015-01-22 18:53:53 +0100 |
---|---|---|
committer | Gunnar Sletta <gunnar@sletta.org> | 2015-03-10 18:14:06 +0000 |
commit | 64fdf70c2249c20895101a7428a9828825a00542 (patch) | |
tree | 06b5e45c59d7fd85b5616aa34cdd15a20604e326 /tests/manual/SourceProxyTest.qml | |
parent | 36d7b8240c9cb0096fc603981dd41abd9f1e7915 (diff) | |
download | qtgraphicaleffects-64fdf70c2249c20895101a7428a9828825a00542.tar.gz |
Let sourceproxy auto-configure layers.
In the old SourceProxy implementation, layer.enabled = true that the
layer was used without a shader source in between. However, since
effects like Blur and DropShadow requires updates to sourceRect and
such, the effects would not work properly.
Since the usecase for layers is primarily to combine it with
layer.effect, we configure the layer.
[ChangeLog] When applying an effect to Item::layer.effect, the effect
will update the layer properties to make the effect work, such as
'smooth' to 'true' and changing 'sourceRect' to take
'transparentBorder' into account.
Change-Id: Idd68b025ade46c0b84142b2afb244730bed863d2
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Diffstat (limited to 'tests/manual/SourceProxyTest.qml')
-rw-r--r-- | tests/manual/SourceProxyTest.qml | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/tests/manual/SourceProxyTest.qml b/tests/manual/SourceProxyTest.qml index e68bc35..94c948d 100644 --- a/tests/manual/SourceProxyTest.qml +++ b/tests/manual/SourceProxyTest.qml @@ -97,6 +97,20 @@ Rectangle { } Text { + id: autoConfLabel; + // This will be shown when the source is a layer which has different + // attributes set than what the source proxy expects. The source proxy + // will then configure the layer. + color: "#00ff00" + anchors.right: parent.right + anchors.verticalCenter: parent.verticalCenter; + text: "(configured)" + font.pixelSize: 12 + font.bold: true + visible: root.expectProxy != proxy.active && !proxy.active && root.sourcing == "layered"; + } + + Text { color: "red" anchors.right: parent.right anchors.verticalCenter: parent.verticalCenter; @@ -104,7 +118,7 @@ Rectangle { text: "FAIL" font.pixelSize: 12 font.bold: true - visible: root.expectProxy != proxy.active + visible: root.expectProxy != proxy.active && !autoConfLabel.visible } } |