mirror of
https://github.com/Armored-Dragon/overte.git
synced 2025-03-11 16:13:16 +01: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
|
||||
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 {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue