From ccf2d71036af65e4c2194de3cf59025eb03f625d Mon Sep 17 00:00:00 2001 From: Zach Fox Date: Tue, 15 Aug 2017 15:42:53 -0700 Subject: [PATCH] V1 done --- .../resources/qml/hifi/commerce/Checkout.qml | 22 ++++++++++++++++++- .../resources/qml/hifi/commerce/Inventory.qml | 1 - .../hifi/commerce/SecurityImageSelection.qml | 4 ++-- 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/interface/resources/qml/hifi/commerce/Checkout.qml b/interface/resources/qml/hifi/commerce/Checkout.qml index e33cf872cf..2b0cae78bb 100644 --- a/interface/resources/qml/hifi/commerce/Checkout.qml +++ b/interface/resources/qml/hifi/commerce/Checkout.qml @@ -66,6 +66,9 @@ Rectangle { } } } + onSecurityImageResult: { + securityImage.source = securityImageSelection.getImagePathFromImageID(imageID); + } } SecurityImageSelection { @@ -92,8 +95,11 @@ Rectangle { // Text size size: hifi.fontSizes.overlayTitle; // Anchors - anchors.fill: parent; + anchors.top: parent.top; + anchors.left: parent.left; anchors.leftMargin: 16; + anchors.bottom: parent.bottom; + width: paintedWidth; // Style color: hifi.colors.lightGrayText; // Alignment @@ -101,6 +107,19 @@ Rectangle { verticalAlignment: Text.AlignVCenter; } + // Security Image + Image { + id: securityImage; + // Anchors + anchors.top: parent.top; + anchors.left: titleBarText.right; + anchors.leftMargin: 16; + height: parent.height - 5; + width: height; + anchors.verticalCenter: parent.verticalCenter; + fillMode: Image.PreserveAspectFit; + } + // Separator HifiControlsUit.Separator { anchors.left: parent.left; @@ -432,6 +451,7 @@ Rectangle { itemHref = message.params.itemHref; commerce.balance(); commerce.inventory(); + commerce.getSecurityImage(); break; default: console.log('Unrecognized message from marketplaces.js:', JSON.stringify(message)); diff --git a/interface/resources/qml/hifi/commerce/Inventory.qml b/interface/resources/qml/hifi/commerce/Inventory.qml index ca01fbec7b..5eb2b7865e 100644 --- a/interface/resources/qml/hifi/commerce/Inventory.qml +++ b/interface/resources/qml/hifi/commerce/Inventory.qml @@ -93,7 +93,6 @@ Rectangle { anchors.leftMargin: 16; height: parent.height - 5; width: height; - anchors.horizontalCenter: parent.horizontalCenter; anchors.verticalCenter: parent.verticalCenter; fillMode: Image.PreserveAspectFit; } diff --git a/interface/resources/qml/hifi/commerce/SecurityImageSelection.qml b/interface/resources/qml/hifi/commerce/SecurityImageSelection.qml index 73698dbd45..c030f642b8 100644 --- a/interface/resources/qml/hifi/commerce/SecurityImageSelection.qml +++ b/interface/resources/qml/hifi/commerce/SecurityImageSelection.qml @@ -161,8 +161,8 @@ Rectangle { // Anchors anchors.fill: parent; currentIndex: -1; - cellWidth: width/2; - cellHeight: height/3; + cellWidth: width / 2; + cellHeight: height / 3; model: gridModel; delegate: Item { width: securityImageGrid.cellWidth;