From e293d122b18e3533d234aef49f5eb01ad75fd75c Mon Sep 17 00:00:00 2001 From: Zach Fox Date: Mon, 28 Aug 2017 09:33:30 -0700 Subject: [PATCH] Add security image to Checkout and Purchases --- .../qml/hifi/commerce/checkout/Checkout.qml | 23 +++++++++++++++++++ .../qml/hifi/commerce/purchases/Purchases.qml | 23 +++++++++++++++++++ 2 files changed, 46 insertions(+) diff --git a/interface/resources/qml/hifi/commerce/checkout/Checkout.qml b/interface/resources/qml/hifi/commerce/checkout/Checkout.qml index b30a236ccb..7a14b367c1 100644 --- a/interface/resources/qml/hifi/commerce/checkout/Checkout.qml +++ b/interface/resources/qml/hifi/commerce/checkout/Checkout.qml @@ -43,6 +43,10 @@ Rectangle { root.activeView = "notSetUp"; } else if (exists && root.activeView !== "checkoutMain") { root.activeView = "checkoutMain"; + } else if (exists) { + // just set the source again (to be sure the change was noticed) + securityImage.source = ""; + securityImage.source = "image://security/securityImage"; } } @@ -89,6 +93,10 @@ Rectangle { } } + HifiWallet.SecurityImageModel { + id: securityImageModel; + } + // // TITLE BAR START // @@ -120,6 +128,21 @@ Rectangle { verticalAlignment: Text.AlignVCenter; } + // Security Image (TEMPORARY!) + Image { + id: securityImage; + // Anchors + anchors.top: parent.top; + anchors.right: parent.right; + anchors.verticalCenter: parent.verticalCenter; + height: parent.height - 10; + width: height; + fillMode: Image.PreserveAspectFit; + mipmap: true; + cache: false; + source: "image://security/securityImage"; + } + // Separator HifiControlsUit.Separator { anchors.left: parent.left; diff --git a/interface/resources/qml/hifi/commerce/purchases/Purchases.qml b/interface/resources/qml/hifi/commerce/purchases/Purchases.qml index 43e7560aa3..67fda739b6 100644 --- a/interface/resources/qml/hifi/commerce/purchases/Purchases.qml +++ b/interface/resources/qml/hifi/commerce/purchases/Purchases.qml @@ -37,6 +37,10 @@ Rectangle { root.activeView = "notSetUp"; } else if (exists && root.activeView !== "purchasesMain") { root.activeView = "purchasesMain"; + } else if (exists) { + // just set the source again (to be sure the change was noticed) + securityImage.source = ""; + securityImage.source = "image://security/securityImage"; } } @@ -58,6 +62,10 @@ Rectangle { } } + HifiWallet.SecurityImageModel { + id: securityImageModel; + } + // // TITLE BAR START // @@ -89,6 +97,21 @@ Rectangle { verticalAlignment: Text.AlignVCenter; } + // Security Image (TEMPORARY!) + Image { + id: securityImage; + // Anchors + anchors.top: parent.top; + anchors.right: parent.right; + anchors.verticalCenter: parent.verticalCenter; + height: parent.height - 10; + width: height; + fillMode: Image.PreserveAspectFit; + mipmap: true; + cache: false; + source: "image://security/securityImage"; + } + // Separator HifiControlsUit.Separator { anchors.left: parent.left;