aboutsummaryrefslogtreecommitdiffstats
path: root/apps/com.luxoft.vehicle/panels/TrunkPanel.qml
diff options
context:
space:
mode:
Diffstat (limited to 'apps/com.luxoft.vehicle/panels/TrunkPanel.qml')
-rw-r--r--apps/com.luxoft.vehicle/panels/TrunkPanel.qml57
1 files changed, 32 insertions, 25 deletions
diff --git a/apps/com.luxoft.vehicle/panels/TrunkPanel.qml b/apps/com.luxoft.vehicle/panels/TrunkPanel.qml
index 636b583d..b2460d12 100644
--- a/apps/com.luxoft.vehicle/panels/TrunkPanel.qml
+++ b/apps/com.luxoft.vehicle/panels/TrunkPanel.qml
@@ -46,39 +46,46 @@ Item {
property bool leftDoorOpened: false
property bool rightDoorOpened: false
property real roofOpenProgress: 0.0
+ property bool enableOpacityMasks
signal trunkClicked()
- Rectangle {
- id: carImageMask
+ Item {
+ anchors.fill: parent
+ clip: true
+ visible: true
+
+ Rectangle {
+ id: carImageMask
+
+ anchors.fill: vehicleTopView
+ gradient: Gradient {
+ GradientStop { position: 0.22; color: "#00000000" }
+ GradientStop { position: 0.44; color: "#ff000000" }
+ GradientStop { position: 1.0; color: "#ff000000" }
+ }
+ visible: false
+ }
- anchors.fill: vehicleTopView
- gradient: Gradient {
- GradientStop { position: 0.22; color: "#00000000" }
- GradientStop { position: 0.44; color: "#ff000000" }
- GradientStop { position: 1.0; color: "#ff000000" }
+ OpacityMask {
+ anchors.fill: vehicleTopView
+ maskSource: carImageMask
+ source: vehicleTopView
}
- visible: false
- }
- OpacityMask {
- anchors.fill: vehicleTopView
- maskSource: carImageMask
- source: vehicleTopView
- }
+ TopPanel {
+ id: vehicleTopView
- TopPanel {
- id: vehicleTopView
+ anchors.top: parent.top
+ anchors.topMargin: Sizes.dp(-160)
+ anchors.horizontalCenter: parent.horizontalCenter
+ visible: !root.enableOpacityMasks
- anchors.top: parent.top
- anchors.topMargin: Sizes.dp(-160)
- anchors.horizontalCenter: parent.horizontalCenter
- visible: false
-
- trunkOpen: root.trunkOpened
- leftDoorOpen: root.leftDoorOpened
- rightDoorOpen: root.rightDoorOpened
- roofOpenProgress: root.roofOpenProgress
+ trunkOpen: root.trunkOpened
+ leftDoorOpen: root.leftDoorOpened
+ rightDoorOpen: root.rightDoorOpened
+ roofOpenProgress: root.roofOpenProgress
+ }
}
VehicleButton {