mirror of
https://github.com/overte-org/overte.git
synced 2025-08-07 06:25:54 +02:00
Merge pull request #15179 from roxanneskelly/Case21703
Case 21703, Case 21704, Case 21701 - random marketplace UI fixes
This commit is contained in:
commit
58146063db
4 changed files with 15 additions and 1 deletions
|
@ -143,6 +143,16 @@ Original.Button {
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
text: control.text
|
text: control.text
|
||||||
Component.onCompleted: {
|
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 !== "") {
|
if (control.buttonGlyph !== "") {
|
||||||
buttonText.x = buttonContentItem.width/2 - buttonTextMetrics.width/2 + (buttonGlyphTextMetrics.width + control.buttonGlyphRightMargin)/2;
|
buttonText.x = buttonContentItem.width/2 - buttonTextMetrics.width/2 + (buttonGlyphTextMetrics.width + control.buttonGlyphRightMargin)/2;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -71,6 +71,7 @@ Item {
|
||||||
|
|
||||||
onBalanceResult : {
|
onBalanceResult : {
|
||||||
balanceText.text = result.data.balance;
|
balanceText.text = result.data.balance;
|
||||||
|
sendButton.enabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
onTransferAssetToNodeResult: {
|
onTransferAssetToNodeResult: {
|
||||||
|
@ -1371,6 +1372,7 @@ Item {
|
||||||
height: 40;
|
height: 40;
|
||||||
width: 100;
|
width: 100;
|
||||||
text: "SUBMIT";
|
text: "SUBMIT";
|
||||||
|
enabled: false;
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (root.assetCertID === "" && parseInt(amountTextField.text) > parseInt(balanceText.text)) {
|
if (root.assetCertID === "" && parseInt(amountTextField.text) > parseInt(balanceText.text)) {
|
||||||
amountTextField.focus = true;
|
amountTextField.focus = true;
|
||||||
|
|
|
@ -569,6 +569,8 @@ Rectangle {
|
||||||
standaloneOptimized: model.standalone_optimized
|
standaloneOptimized: model.standalone_optimized
|
||||||
|
|
||||||
onShowItem: {
|
onShowItem: {
|
||||||
|
// reset the edition back to -1 to clear the 'update item' status
|
||||||
|
marketplaceItem.edition = -1;
|
||||||
MarketplaceScriptingInterface.getMarketplaceItem(item_id);
|
MarketplaceScriptingInterface.getMarketplaceItem(item_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -298,7 +298,7 @@ Rectangle {
|
||||||
property bool isFreeSpecial: isStocking || isUpdate
|
property bool isFreeSpecial: isStocking || isUpdate
|
||||||
enabled: isFreeSpecial || (availability === 'available')
|
enabled: isFreeSpecial || (availability === 'available')
|
||||||
buttonGlyph: (enabled && !isUpdate && (price > 0)) ? hifi.glyphs.hfc : ""
|
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
|
color: hifi.buttons.blue
|
||||||
|
|
||||||
buttonGlyphSize: 24
|
buttonGlyphSize: 24
|
||||||
|
|
Loading…
Reference in a new issue