From 822e5ceb98409e299e6500ca7b60aee167ef6691 Mon Sep 17 00:00:00 2001 From: Roxanne Skelly Date: Wed, 13 Mar 2019 13:42:55 -0700 Subject: [PATCH 1/3] Case 21703 - Disable SUBMIT before balance is retrieved to prevent sending a send-money request with too large of a balance --- .../resources/qml/hifi/commerce/common/sendAsset/SendAsset.qml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/interface/resources/qml/hifi/commerce/common/sendAsset/SendAsset.qml b/interface/resources/qml/hifi/commerce/common/sendAsset/SendAsset.qml index 68d437a346..626ac4da65 100644 --- a/interface/resources/qml/hifi/commerce/common/sendAsset/SendAsset.qml +++ b/interface/resources/qml/hifi/commerce/common/sendAsset/SendAsset.qml @@ -71,6 +71,7 @@ Item { onBalanceResult : { balanceText.text = result.data.balance; + sendButton.enabled = true; } onTransferAssetToNodeResult: { @@ -1371,6 +1372,7 @@ Item { height: 40; width: 100; text: "SUBMIT"; + enabled: false; onClicked: { if (root.assetCertID === "" && parseInt(amountTextField.text) > parseInt(balanceText.text)) { amountTextField.focus = true; From 42bf81201932158a8dae7d7bc70c39495f34b888 Mon Sep 17 00:00:00 2001 From: Roxanne Skelly Date: Wed, 13 Mar 2019 15:03:29 -0700 Subject: [PATCH 2/3] Case 21704 - marketplace button formatting fixes --- interface/resources/qml/controlsUit/Button.qml | 10 ++++++++++ .../qml/hifi/commerce/marketplace/MarketplaceItem.qml | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/interface/resources/qml/controlsUit/Button.qml b/interface/resources/qml/controlsUit/Button.qml index 3c5626e29e..6da85ed6d3 100644 --- a/interface/resources/qml/controlsUit/Button.qml +++ b/interface/resources/qml/controlsUit/Button.qml @@ -143,6 +143,16 @@ Original.Button { horizontalAlignment: Text.AlignHCenter text: control.text Component.onCompleted: { + setTextPosition(); + } + onTextChanged: { + setTextPosition(); + } + function setTextPosition() { + // force TextMetrics to re-evaluate the text field and glyph sizes + // as for some reason it's not automatically being done. + buttonGlyphTextMetrics.text = buttonGlyph.text; + buttonTextMetrics.text = text; if (control.buttonGlyph !== "") { buttonText.x = buttonContentItem.width/2 - buttonTextMetrics.width/2 + (buttonGlyphTextMetrics.width + control.buttonGlyphRightMargin)/2; } else { diff --git a/interface/resources/qml/hifi/commerce/marketplace/MarketplaceItem.qml b/interface/resources/qml/hifi/commerce/marketplace/MarketplaceItem.qml index 605a68fe73..ce692c04d9 100644 --- a/interface/resources/qml/hifi/commerce/marketplace/MarketplaceItem.qml +++ b/interface/resources/qml/hifi/commerce/marketplace/MarketplaceItem.qml @@ -298,7 +298,7 @@ Rectangle { property bool isFreeSpecial: isStocking || isUpdate enabled: isFreeSpecial || (availability === 'available') buttonGlyph: (enabled && !isUpdate && (price > 0)) ? hifi.glyphs.hfc : "" - text: isUpdate ? "UPDATE FOR FREE" : (isStocking ? "FREE STOCK" : (enabled ? (price || "FREE") : availability)) + text: isUpdate ? "UPDATE" : (isStocking ? "FREE STOCK" : (enabled ? (price || "FREE") : availability)) color: hifi.buttons.blue buttonGlyphSize: 24 From 559351a6ebf81402c853de196d9e73b92ffa5ddf Mon Sep 17 00:00:00 2001 From: Roxanne Skelly Date: Wed, 13 Mar 2019 15:33:46 -0700 Subject: [PATCH 3/3] Case 21701 - Items were showing up in marketplace as "updates" when they weren't --- .../resources/qml/hifi/commerce/marketplace/Marketplace.qml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/interface/resources/qml/hifi/commerce/marketplace/Marketplace.qml b/interface/resources/qml/hifi/commerce/marketplace/Marketplace.qml index 6f8150028a..727ead1fde 100644 --- a/interface/resources/qml/hifi/commerce/marketplace/Marketplace.qml +++ b/interface/resources/qml/hifi/commerce/marketplace/Marketplace.qml @@ -569,6 +569,8 @@ Rectangle { standaloneOptimized: model.standalone_optimized onShowItem: { + // reset the edition back to -1 to clear the 'update item' status + marketplaceItem.edition = -1; MarketplaceScriptingInterface.getMarketplaceItem(item_id); }