From 2953b989d1bfb096212aa890551186e71f299322 Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Thu, 25 Oct 2018 21:14:49 -0500 Subject: [PATCH 1/3] Fix tab navigation issue --- .../main/java/bisq/desktop/main/account/AccountView.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/desktop/src/main/java/bisq/desktop/main/account/AccountView.java b/desktop/src/main/java/bisq/desktop/main/account/AccountView.java index 8c45b905751..c991be418e7 100644 --- a/desktop/src/main/java/bisq/desktop/main/account/AccountView.java +++ b/desktop/src/main/java/bisq/desktop/main/account/AccountView.java @@ -106,9 +106,7 @@ public void initialize() { }; tabChangeListener = (ov, oldValue, newValue) -> { - if (arbitratorRegistrationTab != null) { - navigation.navigateTo(MainView.class, AccountView.class, ArbitratorRegistrationView.class); - } else if (newValue == fiatAccountsTab) { + if (newValue == fiatAccountsTab) { navigation.navigateTo(MainView.class, AccountView.class, FiatAccountsView.class); } else if (newValue == altcoinAccountsTab) { navigation.navigateTo(MainView.class, AccountView.class, AltCoinAccountsView.class); @@ -120,6 +118,8 @@ public void initialize() { navigation.navigateTo(MainView.class, AccountView.class, SeedWordsView.class); } else if (newValue == backupTab) { navigation.navigateTo(MainView.class, AccountView.class, BackupView.class); + } else if (newValue == arbitratorRegistrationTab) { + navigation.navigateTo(MainView.class, AccountView.class, ArbitratorRegistrationView.class); } else { navigation.navigateTo(MainView.class, AccountView.class, FiatAccountsView.class); } From 80cb50a717f8bdc969de2f721e235d03724af8b1 Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Thu, 25 Oct 2018 21:16:21 -0500 Subject: [PATCH 2/3] Remove colons, remove progressbar style in dao phases --- .../resources/i18n/displayStrings.properties | 98 +++++++++---------- .../components/SeparatedPhaseBars.java | 1 - .../bonding/roles/BondedRoleTypeWindow.java | 10 +- .../main/dao/governance/ProposalDisplay.java | 12 +-- .../dao/governance/make/MakeProposalView.java | 2 +- .../governance/proposals/ProposalsView.java | 8 +- .../main/dao/wallet/BsqBalanceUtil.java | 12 +-- .../dao/wallet/receive/BsqReceiveView.java | 2 +- 8 files changed, 72 insertions(+), 73 deletions(-) diff --git a/core/src/main/resources/i18n/displayStrings.properties b/core/src/main/resources/i18n/displayStrings.properties index 2ec5a6580e8..7bc7426d8f6 100644 --- a/core/src/main/resources/i18n/displayStrings.properties +++ b/core/src/main/resources/i18n/displayStrings.properties @@ -210,8 +210,8 @@ mainView.menu.account=Account mainView.menu.dao=DAO mainView.marketPrice.provider=Price by -mainView.marketPrice.label=Market Price -mainView.marketPriceWithProvider.label=Market Price by {0} +mainView.marketPrice.label=Market price +mainView.marketPriceWithProvider.label=Market price by {0} mainView.marketPrice.tooltip.provider=The displayed price is provided by {0} mainView.marketPrice.bisqInternalPrice=Price of latest Bisq trade mainView.marketPrice.tooltip.bisqInternalPrice=There is no market price from external price feed providers available.\n\ @@ -842,14 +842,14 @@ setting.preferences.useCustomValue=Use custom value setting.preferences.txFeeMin=Transaction fee must be at least {0} satoshis/byte setting.preferences.txFeeTooLarge=Your input is above any reasonable value (>5000 satoshis/byte). Transaction fee is usually in the range of 50-400 satoshis/byte. setting.preferences.ignorePeers=Ignore peers with onion address (comma sep.) -setting.preferences.refererId=Referral ID: +setting.preferences.refererId=Referral ID setting.preferences.refererId.prompt=Optional referral ID setting.preferences.currenciesInList=Currencies in market price feed list -setting.preferences.prefCurrency=Preferred currency: +setting.preferences.prefCurrency=Preferred currency setting.preferences.displayFiat=Display national currencies setting.preferences.noFiat=There are no national currencies selected setting.preferences.cannotRemovePrefCurrency=You cannot remove your selected preferred display currency -setting.preferences.displayAltcoins=Display altcoins: +setting.preferences.displayAltcoins=Display altcoins setting.preferences.noAltcoins=There are no altcoins selected setting.preferences.addFiat=Add national currency setting.preferences.addAltcoin=Add altcoin @@ -863,7 +863,7 @@ settings.preferences.languageChange=To apply the language change to all screens settings.preferences.arbitrationLanguageWarning=In case of a dispute, please note that arbitration is handled in {0}. settings.preferences.selectCurrencyNetwork=Select network setting.preferences.daoOptions=DAO options -setting.preferences.dao.resync.label=Rebuild DAO state from genesis tx: +setting.preferences.dao.resync.label=Rebuild DAO state from genesis tx setting.preferences.dao.resync.button=Resync setting.preferences.dao.resync.popup=After an application restart the BSQ consensus state will be rebuilt from the genesis transaction. setting.preferences.dao.isDaoFullNode=Run Bisq as DAO full node @@ -963,7 +963,7 @@ account.menu.seedWords=Wallet seed account.menu.backup=Backup account.menu.notifications=Notifications -account.arbitratorRegistration.pubKey=Public key: +account.arbitratorRegistration.pubKey=Public key account.arbitratorRegistration.register=Register arbitrator account.arbitratorRegistration.revoke=Revoke registration @@ -1175,12 +1175,12 @@ dao.proposal.menuItem.vote=Vote on proposals dao.proposal.menuItem.result=Vote results dao.cycle.headline=Voting cycle dao.cycle.overview.headline=Voting cycle overview -dao.cycle.currentPhase=Current phase: -dao.cycle.currentBlockHeight=Current block height: -dao.cycle.proposal=Proposal phase: -dao.cycle.blindVote=Blind vote phase: -dao.cycle.voteReveal=Vote reveal phase: -dao.cycle.voteResult=Vote result: +dao.cycle.currentPhase=Current phase +dao.cycle.currentBlockHeight=Current block height +dao.cycle.proposal=Proposal phase +dao.cycle.blindVote=Blind vote phase +dao.cycle.voteReveal=Vote reveal phase +dao.cycle.voteResult=Vote result dao.cycle.phaseDuration={0} blocks (≈{1}); Block {2} - {3} (≈{4} - ≈{5}) dao.cycle.info.headline=Information @@ -1310,10 +1310,10 @@ dao.bonding.menuItem.bondedRoles=Bonded roles dao.bonding.menuItem.lockupBSQ=Lockup BSQ dao.bonding.menuItem.unlockBSQ=Unlock BSQ dao.bonding.lock.lockBSQ=Lockup BSQ -dao.bonding.lock.amount=Amount of BSQ to lockup: -dao.bonding.lock.time=Unlock time in blocks: -dao.bonding.lock.type=Type of bond: -dao.bonding.lock.bondedRoles=Bonded roles: +dao.bonding.lock.amount=Amount of BSQ to lockup +dao.bonding.lock.time=Unlock time in blocks +dao.bonding.lock.type=Type of bond +dao.bonding.lock.bondedRoles=Bonded roles dao.bonding.lock.setAmount=Set BSQ amount to lockup (min. amount is {0}) dao.bonding.lock.setTime=Number of blocks when locked funds become spendable after the unlock transaction ({0} - {1}) dao.bonding.lock.lockupButton=Lockup @@ -1324,8 +1324,8 @@ dao.bonding.unlock.unlock=Unlock dao.bonding.unlock.sendTx.headline=Confirm unlock transaction dao.bonding.unlock.sendTx.details=Unlock amount: {0}\nLockup time: {1} block(s)\n\nAre you sure you want to proceed? dao.bonding.dashboard.bondsHeadline=Bonded BSQ -dao.bonding.dashboard.lockupAmount=Lockup funds: -dao.bonding.dashboard.unlockingAmount=Unlocking funds (wait until lock time is over): +dao.bonding.dashboard.lockupAmount=Lockup funds +dao.bonding.dashboard.unlockingAmount=Unlocking funds (wait until lock time is over) # suppress inspection "UnusedProperty" dao.bond.lockupType.BONDED_ROLE=Bonded role @@ -1444,15 +1444,15 @@ dao.proposal.create.createNew=Make new proposal dao.proposal.create.create.button=Make proposal dao.proposal=proposal dao.proposal.display.type=Proposal type -dao.proposal.display.name=Name/nickname: -dao.proposal.display.link=Link to detail info: +dao.proposal.display.name=Name/nickname +dao.proposal.display.link=Link to detail info dao.proposal.display.link.prompt=Link to Github issue (https://github.com/bisq-network/compensation/issues) -dao.proposal.display.requestedBsq=Requested amount in BSQ: -dao.proposal.display.bsqAddress=BSQ address: -dao.proposal.display.txId=Proposal transaction ID: -dao.proposal.display.proposalFee=Proposal fee: -dao.proposal.display.myVote=My vote: -dao.proposal.display.voteResult=Vote result summary: +dao.proposal.display.requestedBsq=Requested amount in BSQ +dao.proposal.display.bsqAddress=BSQ address +dao.proposal.display.txId=Proposal transaction ID +dao.proposal.display.proposalFee=Proposal fee +dao.proposal.display.myVote=My vote +dao.proposal.display.voteResult=Vote result summary dao.proposal.display.bondedRoleComboBox.label=Bonded role type dao.proposal.display.requiredBondForRole.label=Required bond for role dao.proposal.display.tickerSymbol.label=Ticker Symbol @@ -1472,7 +1472,7 @@ dao.proposal.voteResult.failed=Rejected dao.proposal.voteResult.summary=Result: {0}; Threshold: {1} (required > {2}); Quorum: {3} (required > {4}) dao.proposal.display.paramComboBox.label=Parameter -dao.proposal.display.paramValue=Parameter value: +dao.proposal.display.paramValue=Parameter value dao.proposal.display.confiscateBondComboBox.label=Choose bond dao.proposal.display.assetComboBox.label=Asset to remove @@ -1491,23 +1491,23 @@ dao.wallet.dashboard.distribution=Distribution of all BSQ dao.wallet.dashboard.locked=Global state of locked BSQ dao.wallet.dashboard.market=Market data dao.wallet.dashboard.txDetails=BSQ transactions details -dao.wallet.dashboard.genesisBlockHeight=Genesis block height: -dao.wallet.dashboard.genesisTxId=Genesis transaction ID: -dao.wallet.dashboard.genesisIssueAmount=BSQ issued at genesis transaction: -dao.wallet.dashboard.compRequestIssueAmount=BSQ issued for compensation requests: -dao.wallet.dashboard.reimbursementAmount=BSQ issued for reimbursement requests: -dao.wallet.dashboard.availableAmount=Total available BSQ: -dao.wallet.dashboard.burntAmount=Burned BSQ (fees): -dao.wallet.dashboard.totalLockedUpAmount=Locked up in bonds: -dao.wallet.dashboard.totalUnlockingAmount=Unlocking BSQ from bonds: -dao.wallet.dashboard.totalUnlockedAmount=Unlocked BSQ from bonds: -dao.wallet.dashboard.allTx=No. of all BSQ transactions: -dao.wallet.dashboard.utxo=No. of all unspent transaction outputs: -dao.wallet.dashboard.compensationIssuanceTx=No. of all compensation request issuance transactions: -dao.wallet.dashboard.reimbursementIssuanceTx=No. of all reimbursement request issuance transactions: -dao.wallet.dashboard.burntTx=No. of all fee payments transactions: -dao.wallet.dashboard.price=Latest BSQ/BTC trade price (in Bisq): -dao.wallet.dashboard.marketCap=Market capitalisation (based on trade price): +dao.wallet.dashboard.genesisBlockHeight=Genesis block height +dao.wallet.dashboard.genesisTxId=Genesis transaction ID +dao.wallet.dashboard.genesisIssueAmount=BSQ issued at genesis transaction +dao.wallet.dashboard.compRequestIssueAmount=BSQ issued for compensation requests +dao.wallet.dashboard.reimbursementAmount=BSQ issued for reimbursement requests +dao.wallet.dashboard.availableAmount=Total available BSQ +dao.wallet.dashboard.burntAmount=Burned BSQ (fees) +dao.wallet.dashboard.totalLockedUpAmount=Locked up in bonds +dao.wallet.dashboard.totalUnlockingAmount=Unlocking BSQ from bonds +dao.wallet.dashboard.totalUnlockedAmount=Unlocked BSQ from bonds +dao.wallet.dashboard.allTx=No. of all BSQ transactions +dao.wallet.dashboard.utxo=No. of all unspent transaction outputs +dao.wallet.dashboard.compensationIssuanceTx=No. of all compensation request issuance transactions +dao.wallet.dashboard.reimbursementIssuanceTx=No. of all reimbursement request issuance transactions +dao.wallet.dashboard.burntTx=No. of all fee payments transactions +dao.wallet.dashboard.price=Latest BSQ/BTC trade price (in Bisq) +dao.wallet.dashboard.marketCap=Market capitalisation (based on trade price) dao.wallet.receive.fundBSQWallet=Fund Bisq BSQ wallet dao.wallet.receive.fundYourWallet=Fund your BSQ wallet @@ -1515,12 +1515,12 @@ dao.wallet.receive.bsqAddress=BSQ address dao.wallet.send.sendFunds=Send funds dao.wallet.send.sendBtcFunds=Send non-BSQ funds (BTC) -dao.wallet.send.amount=Amount in BSQ: -dao.wallet.send.btcAmount=Amount in BTC (non-BSQ funds): +dao.wallet.send.amount=Amount in BSQ +dao.wallet.send.btcAmount=Amount in BTC (non-BSQ funds) dao.wallet.send.setAmount=Set amount to withdraw (min. amount is {0}) dao.wallet.send.setBtcAmount=Set amount in BTC to withdraw (min. amount is {0}) -dao.wallet.send.receiverAddress=Receiver's BSQ address: -dao.wallet.send.receiverBtcAddress=Receiver's BTC address: +dao.wallet.send.receiverAddress=Receiver's BSQ address +dao.wallet.send.receiverBtcAddress=Receiver's BTC address dao.wallet.send.setDestinationAddress=Fill in your destination address dao.wallet.send.send=Send BSQ funds dao.wallet.send.sendBtc=Send BTC funds diff --git a/desktop/src/main/java/bisq/desktop/components/SeparatedPhaseBars.java b/desktop/src/main/java/bisq/desktop/components/SeparatedPhaseBars.java index 5b17bdbbfb3..d74283c2eee 100644 --- a/desktop/src/main/java/bisq/desktop/components/SeparatedPhaseBars.java +++ b/desktop/src/main/java/bisq/desktop/components/SeparatedPhaseBars.java @@ -69,7 +69,6 @@ public SeparatedPhaseBars(List items) { ProgressBar progressBar = new ProgressBar(); progressBar.setMinHeight(9); progressBar.setMaxHeight(9); - progressBar.setStyle("-fx-accent: -bs-green;"); progressBar.progressProperty().bind(item.progressProperty); progressBar.setOpacity(item.isShowBlocks() ? 1 : 0.25); progressBars.getChildren().add(progressBar); diff --git a/desktop/src/main/java/bisq/desktop/main/dao/bonding/roles/BondedRoleTypeWindow.java b/desktop/src/main/java/bisq/desktop/main/dao/bonding/roles/BondedRoleTypeWindow.java index b3fed0d065e..bc5f164c7c8 100644 --- a/desktop/src/main/java/bisq/desktop/main/dao/bonding/roles/BondedRoleTypeWindow.java +++ b/desktop/src/main/java/bisq/desktop/main/dao/bonding/roles/BondedRoleTypeWindow.java @@ -74,19 +74,19 @@ protected void createGridPane() { } private void addContent() { - FormBuilder.addTopLabelTextField(gridPane, ++rowIndex, Res.getWithCol("dao.bond.bondedRoleType.details.role"), + FormBuilder.addTopLabelTextField(gridPane, ++rowIndex, Res.get("dao.bond.bondedRoleType.details.role"), bondedRoleType.getDisplayString()); - FormBuilder.addTopLabelTextField(gridPane, ++rowIndex, Res.getWithCol("dao.bond.bondedRoleType.details.requiredBond"), + FormBuilder.addTopLabelTextField(gridPane, ++rowIndex, Res.get("dao.bond.bondedRoleType.details.requiredBond"), bsqFormatter.formatCoinWithCode(Coin.valueOf(bondedRoleType.getRequiredBond()))); - FormBuilder.addTopLabelTextField(gridPane, ++rowIndex, Res.getWithCol("dao.bond.bondedRoleType.details.unlockTime"), + FormBuilder.addTopLabelTextField(gridPane, ++rowIndex, Res.get("dao.bond.bondedRoleType.details.unlockTime"), Res.get("dao.bond.bondedRoleType.details.blocks", bondedRoleType.getUnlockTime())); - FormBuilder.addLabelHyperlinkWithIcon(gridPane, ++rowIndex, Res.getWithCol("dao.bond.bondedRoleType.details.link"), + FormBuilder.addLabelHyperlinkWithIcon(gridPane, ++rowIndex, Res.get("dao.bond.bondedRoleType.details.link"), bondedRoleType.getLink(), bondedRoleType.getLink()); - FormBuilder.addTopLabelTextField(gridPane, ++rowIndex, Res.getWithCol("dao.bond.bondedRoleType.details.isSingleton"), + FormBuilder.addTopLabelTextField(gridPane, ++rowIndex, Res.get("dao.bond.bondedRoleType.details.isSingleton"), bsqFormatter.booleanToYesNo(bondedRoleType.isAllowMultipleHolders())); } } diff --git a/desktop/src/main/java/bisq/desktop/main/dao/governance/ProposalDisplay.java b/desktop/src/main/java/bisq/desktop/main/dao/governance/ProposalDisplay.java index 1313fe0a6cf..cd2fdc7376a 100644 --- a/desktop/src/main/java/bisq/desktop/main/dao/governance/ProposalDisplay.java +++ b/desktop/src/main/java/bisq/desktop/main/dao/governance/ProposalDisplay.java @@ -183,7 +183,7 @@ public void createAllFields(String title, int gridRowStartIndex, double top, Pro titledGroupBg = addTitledGroupBg(gridPane, gridRow, titledGroupBgRowSpan, title, top); double proposalTypeTop = top == Layout.GROUP_DISTANCE ? Layout.FIRST_ROW_AND_GROUP_DISTANCE : Layout.FIRST_ROW_DISTANCE; proposalTypeTextField = FormBuilder.addTopLabelTextField(gridPane, gridRow, - Res.getWithCol("dao.proposal.display.type"), proposalType.getDisplayName(), proposalTypeTop).second; + Res.get("dao.proposal.display.type"), proposalType.getDisplayName(), proposalTypeTop).second; nameTextField = addInputTextField(gridPane, ++gridRow, Res.get("dao.proposal.display.name")); nameTextField.setValidator(new InputValidator()); @@ -222,7 +222,7 @@ public void createAllFields(String title, int gridRowStartIndex, double top, Pro case CHANGE_PARAM: checkNotNull(gridPane, "gridPane must not be null"); paramComboBox = FormBuilder.addComboBox(gridPane, ++gridRow, - Res.getWithCol("dao.proposal.display.paramComboBox.label")); + Res.get("dao.proposal.display.paramComboBox.label")); comboBoxValueTextFieldIndex = gridRow; checkNotNull(paramComboBox, "paramComboBox must not be null"); List list = Arrays.stream(Param.values()) @@ -260,7 +260,7 @@ public Param fromString(String string) { break; case BONDED_ROLE: bondedRoleTypeComboBox = FormBuilder.addComboBox(gridPane, ++gridRow, - Res.getWithCol("dao.proposal.display.bondedRoleComboBox.label")); + Res.get("dao.proposal.display.bondedRoleComboBox.label")); comboBoxValueTextFieldIndex = gridRow; checkNotNull(bondedRoleTypeComboBox, "bondedRoleTypeComboBox must not be null"); bondedRoleTypeComboBox.setItems(FXCollections.observableArrayList(BondedRoleType.values())); @@ -277,7 +277,7 @@ public BondedRoleType fromString(String string) { }); comboBoxes.add(bondedRoleTypeComboBox); requiredBondForRoleTextField = addTopLabelTextField(gridPane, ++gridRow, - Res.getWithCol("dao.proposal.display.requiredBondForRole.label")).second; + Res.get("dao.proposal.display.requiredBondForRole.label")).second; requiredBondForRoleListener = (observable, oldValue, newValue) -> { if (newValue != null) { @@ -289,7 +289,7 @@ public BondedRoleType fromString(String string) { break; case CONFISCATE_BOND: confiscateBondComboBox = FormBuilder.addComboBox(gridPane, ++gridRow, - Res.getWithCol("dao.proposal.display.confiscateBondComboBox.label")); + Res.get("dao.proposal.display.confiscateBondComboBox.label")); comboBoxValueTextFieldIndex = gridRow; checkNotNull(confiscateBondComboBox, "confiscateBondComboBox must not be null"); confiscateBondComboBox.setItems(FXCollections.observableArrayList(daoFacade.getValidBondedRoleList())); @@ -310,7 +310,7 @@ public BondedRole fromString(String string) { break; case REMOVE_ASSET: assetComboBox = FormBuilder.addComboBox(gridPane, ++gridRow, - Res.getWithCol("dao.proposal.display.assetComboBox.label")); + Res.get("dao.proposal.display.assetComboBox.label")); comboBoxValueTextFieldIndex = gridRow; checkNotNull(assetComboBox, "assetComboBox must not be null"); List assetList = CurrencyUtil.getAssetRegistry().stream() diff --git a/desktop/src/main/java/bisq/desktop/main/dao/governance/make/MakeProposalView.java b/desktop/src/main/java/bisq/desktop/main/dao/governance/make/MakeProposalView.java index 2cea9e3d453..56ad6bb2d35 100644 --- a/desktop/src/main/java/bisq/desktop/main/dao/governance/make/MakeProposalView.java +++ b/desktop/src/main/java/bisq/desktop/main/dao/governance/make/MakeProposalView.java @@ -130,7 +130,7 @@ public void initialize() { addTitledGroupBg(root, ++gridRow, 1, Res.get("dao.proposal.create.selectProposalType"), Layout.GROUP_DISTANCE); proposalTypeComboBox = FormBuilder.addComboBox(root, gridRow, - Res.getWithCol("dao.proposal.create.proposalType"), Layout.FIRST_ROW_AND_GROUP_DISTANCE); + Res.get("dao.proposal.create.proposalType"), Layout.FIRST_ROW_AND_GROUP_DISTANCE); proposalTypeComboBox.setConverter(new StringConverter<>() { @Override public String toString(ProposalType proposalType) { diff --git a/desktop/src/main/java/bisq/desktop/main/dao/governance/proposals/ProposalsView.java b/desktop/src/main/java/bisq/desktop/main/dao/governance/proposals/ProposalsView.java index 9023a6c2a70..b878aafc622 100644 --- a/desktop/src/main/java/bisq/desktop/main/dao/governance/proposals/ProposalsView.java +++ b/desktop/src/main/java/bisq/desktop/main/dao/governance/proposals/ProposalsView.java @@ -667,7 +667,7 @@ private void createVoteView() { voteFields.add(voteTitledGroupBg); Tuple3 meritTuple = addTopLabelTextField(root, gridRow, - Res.getWithCol("dao.proposal.myVote.merit"), 40); + Res.get("dao.proposal.myVote.merit"), 40); Label meritLabel = meritTuple.first; meritTextField = meritTuple.second; meritTextField.setText(bsqFormatter.formatCoinWithCode(Coin.ZERO)); @@ -675,12 +675,12 @@ private void createVoteView() { voteFields.add(meritTextField); stakeInputTextField = addInputTextField(root, ++gridRow, - Res.getWithCol("dao.proposal.myVote.stake")); + Res.get("dao.proposal.myVote.stake")); stakeInputTextField.setValidator(new BsqValidator(bsqFormatter)); voteFields.add(stakeInputTextField); Tuple2 blindVoteTxIdTuple = addLabelTxIdTextField(root, ++gridRow, - Res.getWithCol("dao.proposal.myVote.blindVoteTxId")); + Res.get("dao.proposal.myVote.blindVoteTxId")); blindVoteTxIdLabel = blindVoteTxIdTuple.first; blindVoteTxIdTextField = blindVoteTxIdTuple.second; blindVoteTxIdTextField.setBsq(true); @@ -688,7 +688,7 @@ private void createVoteView() { voteFields.add(blindVoteTxIdTextField); Tuple2 revealTxIdTuple = addLabelTxIdTextField(root, ++gridRow, - Res.getWithCol("dao.proposal.myVote.revealTxId")); + Res.get("dao.proposal.myVote.revealTxId")); revealTxIdLabel = revealTxIdTuple.first; revealTxIdTextField = revealTxIdTuple.second; revealTxIdTextField.setBsq(true); diff --git a/desktop/src/main/java/bisq/desktop/main/dao/wallet/BsqBalanceUtil.java b/desktop/src/main/java/bisq/desktop/main/dao/wallet/BsqBalanceUtil.java index 54f2fbb87b2..d2af8540771 100644 --- a/desktop/src/main/java/bisq/desktop/main/dao/wallet/BsqBalanceUtil.java +++ b/desktop/src/main/java/bisq/desktop/main/dao/wallet/BsqBalanceUtil.java @@ -65,30 +65,30 @@ private BsqBalanceUtil(BsqWalletService bsqWalletService, public int addGroup(GridPane gridPane, int gridRow) { titledGroupBg = addTitledGroupBg(gridPane, gridRow, 5, Res.get("dao.wallet.dashboard.myBalance")); availableBalanceTextField = FormBuilder.addTopLabelTextField(gridPane, gridRow, - Res.getWithCol("dao.availableBsqBalance"), + Res.get("dao.availableBsqBalance"), Layout.FIRST_ROW_DISTANCE).second; availableBalanceTextField.setMouseTransparent(false); unverifiedBalanceTextField = FormBuilder.addTopLabelTextField(gridPane, ++gridRow, - Res.getWithCol("dao.unverifiedBsqBalance")).second; + Res.get("dao.unverifiedBsqBalance")).second; unverifiedBalanceTextField.setMouseTransparent(false); lockedForVoteBalanceTextField = FormBuilder.addTopLabelTextField(gridPane, ++gridRow, - Res.getWithCol("dao.lockedForVoteBalance")).second; + Res.get("dao.lockedForVoteBalance")).second; lockedForVoteBalanceTextField.setMouseTransparent(false); - lockedInBondsBalanceTextField = FormBuilder.addTopLabelTextField(gridPane, ++gridRow, Res.getWithCol( + lockedInBondsBalanceTextField = FormBuilder.addTopLabelTextField(gridPane, ++gridRow, Res.get( "dao.lockedInBonds")).second; lockedInBondsBalanceTextField.setMouseTransparent(false); // TODO add unlockingBondsBalanceTextField totalBalanceTextField = FormBuilder.addTopLabelTextField(gridPane, ++gridRow, - Res.getWithCol("dao.totalBsqBalance")).second; + Res.get("dao.totalBsqBalance")).second; totalBalanceTextField.setMouseTransparent(false); Tuple3 tuple3 = FormBuilder.addTopLabelTextField(gridPane, ++gridRow, - Res.getWithCol("dao.availableNonBsqBalance")); + Res.get("dao.availableNonBsqBalance")); availableNonBsqBalanceLabel = tuple3.first; availableNonBsqBalanceTextField = tuple3.second; availableNonBsqBalanceTextField.setMouseTransparent(false); diff --git a/desktop/src/main/java/bisq/desktop/main/dao/wallet/receive/BsqReceiveView.java b/desktop/src/main/java/bisq/desktop/main/dao/wallet/receive/BsqReceiveView.java index 2facfdcaf36..aeba65211eb 100644 --- a/desktop/src/main/java/bisq/desktop/main/dao/wallet/receive/BsqReceiveView.java +++ b/desktop/src/main/java/bisq/desktop/main/dao/wallet/receive/BsqReceiveView.java @@ -62,7 +62,7 @@ public void initialize() { addTitledGroupBg(root, ++gridRow, 1, Res.get("dao.wallet.receive.fundYourWallet"), Layout.GROUP_DISTANCE); - addressTextField = addLabelBsqAddressTextField(root, gridRow, Res.getWithCol("dao.wallet.receive.bsqAddress"), + addressTextField = addLabelBsqAddressTextField(root, gridRow, Res.get("dao.wallet.receive.bsqAddress"), Layout.FIRST_ROW_AND_GROUP_DISTANCE).second; addressTextField.setPaymentLabel(paymentLabelString); } From 4f52f227d67f1d1127b6559495f23787a0526e05 Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Thu, 25 Oct 2018 21:52:41 -0500 Subject: [PATCH 3/3] Small UI improvements - Remove arrow for show all and edit list - Remove colons - Remove progressbar style in dao phases --- .../resources/i18n/displayStrings.properties | 2 ++ .../bonding/roles/BondedRoleTypeWindow.java | 10 +++---- .../main/dao/governance/ProposalDisplay.java | 12 ++++---- .../dao/governance/make/MakeProposalView.java | 2 +- .../governance/proposals/ProposalsView.java | 8 ++--- .../main/dao/wallet/BsqBalanceUtil.java | 12 ++++---- .../dao/wallet/receive/BsqReceiveView.java | 2 +- .../market/trades/TradesChartsViewModel.java | 2 +- .../offer/offerbook/OfferBookViewModel.java | 4 +-- .../main/java/bisq/desktop/util/GUIUtil.java | 30 +++++++++---------- 10 files changed, 42 insertions(+), 42 deletions(-) diff --git a/core/src/main/resources/i18n/displayStrings.properties b/core/src/main/resources/i18n/displayStrings.properties index 7bc7426d8f6..9c8efad41aa 100644 --- a/core/src/main/resources/i18n/displayStrings.properties +++ b/core/src/main/resources/i18n/displayStrings.properties @@ -189,6 +189,8 @@ shared.tradingFeeInBsqInfo=equivalent to {0} used as mining fee shared.openURL=Open {0} shared.fiat=Fiat shared.crypto=Crypto +shared.all=All +shared.edit=Edit #################################################################### diff --git a/desktop/src/main/java/bisq/desktop/main/dao/bonding/roles/BondedRoleTypeWindow.java b/desktop/src/main/java/bisq/desktop/main/dao/bonding/roles/BondedRoleTypeWindow.java index bc5f164c7c8..b3fed0d065e 100644 --- a/desktop/src/main/java/bisq/desktop/main/dao/bonding/roles/BondedRoleTypeWindow.java +++ b/desktop/src/main/java/bisq/desktop/main/dao/bonding/roles/BondedRoleTypeWindow.java @@ -74,19 +74,19 @@ protected void createGridPane() { } private void addContent() { - FormBuilder.addTopLabelTextField(gridPane, ++rowIndex, Res.get("dao.bond.bondedRoleType.details.role"), + FormBuilder.addTopLabelTextField(gridPane, ++rowIndex, Res.getWithCol("dao.bond.bondedRoleType.details.role"), bondedRoleType.getDisplayString()); - FormBuilder.addTopLabelTextField(gridPane, ++rowIndex, Res.get("dao.bond.bondedRoleType.details.requiredBond"), + FormBuilder.addTopLabelTextField(gridPane, ++rowIndex, Res.getWithCol("dao.bond.bondedRoleType.details.requiredBond"), bsqFormatter.formatCoinWithCode(Coin.valueOf(bondedRoleType.getRequiredBond()))); - FormBuilder.addTopLabelTextField(gridPane, ++rowIndex, Res.get("dao.bond.bondedRoleType.details.unlockTime"), + FormBuilder.addTopLabelTextField(gridPane, ++rowIndex, Res.getWithCol("dao.bond.bondedRoleType.details.unlockTime"), Res.get("dao.bond.bondedRoleType.details.blocks", bondedRoleType.getUnlockTime())); - FormBuilder.addLabelHyperlinkWithIcon(gridPane, ++rowIndex, Res.get("dao.bond.bondedRoleType.details.link"), + FormBuilder.addLabelHyperlinkWithIcon(gridPane, ++rowIndex, Res.getWithCol("dao.bond.bondedRoleType.details.link"), bondedRoleType.getLink(), bondedRoleType.getLink()); - FormBuilder.addTopLabelTextField(gridPane, ++rowIndex, Res.get("dao.bond.bondedRoleType.details.isSingleton"), + FormBuilder.addTopLabelTextField(gridPane, ++rowIndex, Res.getWithCol("dao.bond.bondedRoleType.details.isSingleton"), bsqFormatter.booleanToYesNo(bondedRoleType.isAllowMultipleHolders())); } } diff --git a/desktop/src/main/java/bisq/desktop/main/dao/governance/ProposalDisplay.java b/desktop/src/main/java/bisq/desktop/main/dao/governance/ProposalDisplay.java index cd2fdc7376a..1313fe0a6cf 100644 --- a/desktop/src/main/java/bisq/desktop/main/dao/governance/ProposalDisplay.java +++ b/desktop/src/main/java/bisq/desktop/main/dao/governance/ProposalDisplay.java @@ -183,7 +183,7 @@ public void createAllFields(String title, int gridRowStartIndex, double top, Pro titledGroupBg = addTitledGroupBg(gridPane, gridRow, titledGroupBgRowSpan, title, top); double proposalTypeTop = top == Layout.GROUP_DISTANCE ? Layout.FIRST_ROW_AND_GROUP_DISTANCE : Layout.FIRST_ROW_DISTANCE; proposalTypeTextField = FormBuilder.addTopLabelTextField(gridPane, gridRow, - Res.get("dao.proposal.display.type"), proposalType.getDisplayName(), proposalTypeTop).second; + Res.getWithCol("dao.proposal.display.type"), proposalType.getDisplayName(), proposalTypeTop).second; nameTextField = addInputTextField(gridPane, ++gridRow, Res.get("dao.proposal.display.name")); nameTextField.setValidator(new InputValidator()); @@ -222,7 +222,7 @@ public void createAllFields(String title, int gridRowStartIndex, double top, Pro case CHANGE_PARAM: checkNotNull(gridPane, "gridPane must not be null"); paramComboBox = FormBuilder.addComboBox(gridPane, ++gridRow, - Res.get("dao.proposal.display.paramComboBox.label")); + Res.getWithCol("dao.proposal.display.paramComboBox.label")); comboBoxValueTextFieldIndex = gridRow; checkNotNull(paramComboBox, "paramComboBox must not be null"); List list = Arrays.stream(Param.values()) @@ -260,7 +260,7 @@ public Param fromString(String string) { break; case BONDED_ROLE: bondedRoleTypeComboBox = FormBuilder.addComboBox(gridPane, ++gridRow, - Res.get("dao.proposal.display.bondedRoleComboBox.label")); + Res.getWithCol("dao.proposal.display.bondedRoleComboBox.label")); comboBoxValueTextFieldIndex = gridRow; checkNotNull(bondedRoleTypeComboBox, "bondedRoleTypeComboBox must not be null"); bondedRoleTypeComboBox.setItems(FXCollections.observableArrayList(BondedRoleType.values())); @@ -277,7 +277,7 @@ public BondedRoleType fromString(String string) { }); comboBoxes.add(bondedRoleTypeComboBox); requiredBondForRoleTextField = addTopLabelTextField(gridPane, ++gridRow, - Res.get("dao.proposal.display.requiredBondForRole.label")).second; + Res.getWithCol("dao.proposal.display.requiredBondForRole.label")).second; requiredBondForRoleListener = (observable, oldValue, newValue) -> { if (newValue != null) { @@ -289,7 +289,7 @@ public BondedRoleType fromString(String string) { break; case CONFISCATE_BOND: confiscateBondComboBox = FormBuilder.addComboBox(gridPane, ++gridRow, - Res.get("dao.proposal.display.confiscateBondComboBox.label")); + Res.getWithCol("dao.proposal.display.confiscateBondComboBox.label")); comboBoxValueTextFieldIndex = gridRow; checkNotNull(confiscateBondComboBox, "confiscateBondComboBox must not be null"); confiscateBondComboBox.setItems(FXCollections.observableArrayList(daoFacade.getValidBondedRoleList())); @@ -310,7 +310,7 @@ public BondedRole fromString(String string) { break; case REMOVE_ASSET: assetComboBox = FormBuilder.addComboBox(gridPane, ++gridRow, - Res.get("dao.proposal.display.assetComboBox.label")); + Res.getWithCol("dao.proposal.display.assetComboBox.label")); comboBoxValueTextFieldIndex = gridRow; checkNotNull(assetComboBox, "assetComboBox must not be null"); List assetList = CurrencyUtil.getAssetRegistry().stream() diff --git a/desktop/src/main/java/bisq/desktop/main/dao/governance/make/MakeProposalView.java b/desktop/src/main/java/bisq/desktop/main/dao/governance/make/MakeProposalView.java index 56ad6bb2d35..2cea9e3d453 100644 --- a/desktop/src/main/java/bisq/desktop/main/dao/governance/make/MakeProposalView.java +++ b/desktop/src/main/java/bisq/desktop/main/dao/governance/make/MakeProposalView.java @@ -130,7 +130,7 @@ public void initialize() { addTitledGroupBg(root, ++gridRow, 1, Res.get("dao.proposal.create.selectProposalType"), Layout.GROUP_DISTANCE); proposalTypeComboBox = FormBuilder.addComboBox(root, gridRow, - Res.get("dao.proposal.create.proposalType"), Layout.FIRST_ROW_AND_GROUP_DISTANCE); + Res.getWithCol("dao.proposal.create.proposalType"), Layout.FIRST_ROW_AND_GROUP_DISTANCE); proposalTypeComboBox.setConverter(new StringConverter<>() { @Override public String toString(ProposalType proposalType) { diff --git a/desktop/src/main/java/bisq/desktop/main/dao/governance/proposals/ProposalsView.java b/desktop/src/main/java/bisq/desktop/main/dao/governance/proposals/ProposalsView.java index b878aafc622..9023a6c2a70 100644 --- a/desktop/src/main/java/bisq/desktop/main/dao/governance/proposals/ProposalsView.java +++ b/desktop/src/main/java/bisq/desktop/main/dao/governance/proposals/ProposalsView.java @@ -667,7 +667,7 @@ private void createVoteView() { voteFields.add(voteTitledGroupBg); Tuple3 meritTuple = addTopLabelTextField(root, gridRow, - Res.get("dao.proposal.myVote.merit"), 40); + Res.getWithCol("dao.proposal.myVote.merit"), 40); Label meritLabel = meritTuple.first; meritTextField = meritTuple.second; meritTextField.setText(bsqFormatter.formatCoinWithCode(Coin.ZERO)); @@ -675,12 +675,12 @@ private void createVoteView() { voteFields.add(meritTextField); stakeInputTextField = addInputTextField(root, ++gridRow, - Res.get("dao.proposal.myVote.stake")); + Res.getWithCol("dao.proposal.myVote.stake")); stakeInputTextField.setValidator(new BsqValidator(bsqFormatter)); voteFields.add(stakeInputTextField); Tuple2 blindVoteTxIdTuple = addLabelTxIdTextField(root, ++gridRow, - Res.get("dao.proposal.myVote.blindVoteTxId")); + Res.getWithCol("dao.proposal.myVote.blindVoteTxId")); blindVoteTxIdLabel = blindVoteTxIdTuple.first; blindVoteTxIdTextField = blindVoteTxIdTuple.second; blindVoteTxIdTextField.setBsq(true); @@ -688,7 +688,7 @@ private void createVoteView() { voteFields.add(blindVoteTxIdTextField); Tuple2 revealTxIdTuple = addLabelTxIdTextField(root, ++gridRow, - Res.get("dao.proposal.myVote.revealTxId")); + Res.getWithCol("dao.proposal.myVote.revealTxId")); revealTxIdLabel = revealTxIdTuple.first; revealTxIdTextField = revealTxIdTuple.second; revealTxIdTextField.setBsq(true); diff --git a/desktop/src/main/java/bisq/desktop/main/dao/wallet/BsqBalanceUtil.java b/desktop/src/main/java/bisq/desktop/main/dao/wallet/BsqBalanceUtil.java index d2af8540771..54f2fbb87b2 100644 --- a/desktop/src/main/java/bisq/desktop/main/dao/wallet/BsqBalanceUtil.java +++ b/desktop/src/main/java/bisq/desktop/main/dao/wallet/BsqBalanceUtil.java @@ -65,30 +65,30 @@ private BsqBalanceUtil(BsqWalletService bsqWalletService, public int addGroup(GridPane gridPane, int gridRow) { titledGroupBg = addTitledGroupBg(gridPane, gridRow, 5, Res.get("dao.wallet.dashboard.myBalance")); availableBalanceTextField = FormBuilder.addTopLabelTextField(gridPane, gridRow, - Res.get("dao.availableBsqBalance"), + Res.getWithCol("dao.availableBsqBalance"), Layout.FIRST_ROW_DISTANCE).second; availableBalanceTextField.setMouseTransparent(false); unverifiedBalanceTextField = FormBuilder.addTopLabelTextField(gridPane, ++gridRow, - Res.get("dao.unverifiedBsqBalance")).second; + Res.getWithCol("dao.unverifiedBsqBalance")).second; unverifiedBalanceTextField.setMouseTransparent(false); lockedForVoteBalanceTextField = FormBuilder.addTopLabelTextField(gridPane, ++gridRow, - Res.get("dao.lockedForVoteBalance")).second; + Res.getWithCol("dao.lockedForVoteBalance")).second; lockedForVoteBalanceTextField.setMouseTransparent(false); - lockedInBondsBalanceTextField = FormBuilder.addTopLabelTextField(gridPane, ++gridRow, Res.get( + lockedInBondsBalanceTextField = FormBuilder.addTopLabelTextField(gridPane, ++gridRow, Res.getWithCol( "dao.lockedInBonds")).second; lockedInBondsBalanceTextField.setMouseTransparent(false); // TODO add unlockingBondsBalanceTextField totalBalanceTextField = FormBuilder.addTopLabelTextField(gridPane, ++gridRow, - Res.get("dao.totalBsqBalance")).second; + Res.getWithCol("dao.totalBsqBalance")).second; totalBalanceTextField.setMouseTransparent(false); Tuple3 tuple3 = FormBuilder.addTopLabelTextField(gridPane, ++gridRow, - Res.get("dao.availableNonBsqBalance")); + Res.getWithCol("dao.availableNonBsqBalance")); availableNonBsqBalanceLabel = tuple3.first; availableNonBsqBalanceTextField = tuple3.second; availableNonBsqBalanceTextField.setMouseTransparent(false); diff --git a/desktop/src/main/java/bisq/desktop/main/dao/wallet/receive/BsqReceiveView.java b/desktop/src/main/java/bisq/desktop/main/dao/wallet/receive/BsqReceiveView.java index aeba65211eb..2facfdcaf36 100644 --- a/desktop/src/main/java/bisq/desktop/main/dao/wallet/receive/BsqReceiveView.java +++ b/desktop/src/main/java/bisq/desktop/main/dao/wallet/receive/BsqReceiveView.java @@ -62,7 +62,7 @@ public void initialize() { addTitledGroupBg(root, ++gridRow, 1, Res.get("dao.wallet.receive.fundYourWallet"), Layout.GROUP_DISTANCE); - addressTextField = addLabelBsqAddressTextField(root, gridRow, Res.get("dao.wallet.receive.bsqAddress"), + addressTextField = addLabelBsqAddressTextField(root, gridRow, Res.getWithCol("dao.wallet.receive.bsqAddress"), Layout.FIRST_ROW_AND_GROUP_DISTANCE).second; addressTextField.setPaymentLabel(paymentLabelString); } diff --git a/desktop/src/main/java/bisq/desktop/main/market/trades/TradesChartsViewModel.java b/desktop/src/main/java/bisq/desktop/main/market/trades/TradesChartsViewModel.java index bea7282c0e7..2994974069e 100644 --- a/desktop/src/main/java/bisq/desktop/main/market/trades/TradesChartsViewModel.java +++ b/desktop/src/main/java/bisq/desktop/main/market/trades/TradesChartsViewModel.java @@ -103,7 +103,7 @@ public enum TickUnit { final ObjectProperty selectedTradeCurrencyProperty = new SimpleObjectProperty<>(); final BooleanProperty showAllTradeCurrenciesProperty = new SimpleBooleanProperty(false); private final CurrencyList currencyListItems; - private final CurrencyListItem showAllCurrencyListItem = new CurrencyListItem(new CryptoCurrency(GUIUtil.SHOW_ALL_FLAG, GUIUtil.SHOW_ALL_FLAG), -1); + private final CurrencyListItem showAllCurrencyListItem = new CurrencyListItem(new CryptoCurrency(GUIUtil.SHOW_ALL_FLAG, ""), -1); final ObservableList tradeStatisticsByCurrency = FXCollections.observableArrayList(); final ObservableList> priceItems = FXCollections.observableArrayList(); final ObservableList> volumeItems = FXCollections.observableArrayList(); diff --git a/desktop/src/main/java/bisq/desktop/main/offer/offerbook/OfferBookViewModel.java b/desktop/src/main/java/bisq/desktop/main/offer/offerbook/OfferBookViewModel.java index 04b8c0aea68..f7e7f415331 100644 --- a/desktop/src/main/java/bisq/desktop/main/offer/offerbook/OfferBookViewModel.java +++ b/desktop/src/main/java/bisq/desktop/main/offer/offerbook/OfferBookViewModel.java @@ -491,9 +491,9 @@ private void setMarketPriceFeedCurrency() { private void fillAllTradeCurrencies() { allTradeCurrencies.clear(); // Used for ignoring filter (show all) - allTradeCurrencies.add(new CryptoCurrency(GUIUtil.SHOW_ALL_FLAG, GUIUtil.SHOW_ALL_FLAG)); + allTradeCurrencies.add(new CryptoCurrency(GUIUtil.SHOW_ALL_FLAG, "")); allTradeCurrencies.addAll(preferences.getTradeCurrenciesAsObservable()); - allTradeCurrencies.add(new CryptoCurrency(GUIUtil.EDIT_FLAG, GUIUtil.EDIT_FLAG)); + allTradeCurrencies.add(new CryptoCurrency(GUIUtil.EDIT_FLAG, "")); } /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/desktop/src/main/java/bisq/desktop/util/GUIUtil.java b/desktop/src/main/java/bisq/desktop/util/GUIUtil.java index 1fc092e9f18..912ca8df428 100644 --- a/desktop/src/main/java/bisq/desktop/util/GUIUtil.java +++ b/desktop/src/main/java/bisq/desktop/util/GUIUtil.java @@ -128,8 +128,8 @@ @Slf4j public class GUIUtil { - public final static String SHOW_ALL_FLAG = "SHOW_ALL_FLAG"; - public final static String EDIT_FLAG = "EDIT_FLAG"; + public final static String SHOW_ALL_FLAG = "list.currency.showAll"; // Used for accessing the i18n resource + public final static String EDIT_FLAG = "list.currency.editList"; // Used for accessing the i18n resource public final static int FIAT_DECIMALS_WITH_ZEROS = 0; public final static int FIAT_PRICE_DECIMALS_WITH_ZEROS = 3; @@ -295,10 +295,10 @@ protected void updateItem(CurrencyListItem item, boolean empty) { switch (code) { case GUIUtil.SHOW_ALL_FLAG: - currency.setText("▶ " + Res.get("list.currency.showAll")); + currency.setText(Res.get("list.currency.showAll")); break; case GUIUtil.EDIT_FLAG: - currency.setText(Res.get("▼ " + "list.currency.editList")); + currency.setText(Res.get("list.currency.editList")); break; default: if (preferences.isSortMarketCurrenciesNumerically()) { @@ -347,11 +347,11 @@ protected void updateItem(CurrencyListItem item, boolean empty) { switch (code) { case GUIUtil.SHOW_ALL_FLAG: - currencyType.setText("▶"); + currencyType.setText(Res.get("shared.all")); currency.setText(Res.get("list.currency.showAll")); break; case GUIUtil.EDIT_FLAG: - currencyType.setText("▼"); + currencyType.setText(Res.get("shared.edit")); currency.setText(Res.get("list.currency.editList")); break; default: @@ -392,10 +392,10 @@ protected void updateItem(TradeCurrency item, boolean empty) { switch (code) { case GUIUtil.SHOW_ALL_FLAG: - currency.setText("▶ " + Res.get("list.currency.showAll")); + currency.setText(Res.get("list.currency.showAll")); break; case GUIUtil.EDIT_FLAG: - currency.setText(Res.get("▼ " + "list.currency.editList")); + currency.setText(Res.get("list.currency.editList")); break; default: if (offerCountOptional.isPresent()) { @@ -447,18 +447,16 @@ protected void updateItem(TradeCurrency item, boolean empty) { switch (code) { case GUIUtil.SHOW_ALL_FLAG: - currencyType.setText("▶"); + currencyType.setText(Res.get("shared.all")); currency.setText(Res.get("list.currency.showAll")); break; case GUIUtil.EDIT_FLAG: - currencyType.setText("▼"); + currencyType.setText(Res.get("shared.edit")); currency.setText(Res.get("list.currency.editList")); break; default: - if (offerCountOptional.isPresent()) { - offers.setText(offers.getText() + " (" + offerCountOptional.get() + " " + - (offerCountOptional.get() == 1 ? postFixSingle : postFixMulti) + ")"); - } + offerCountOptional.ifPresent(numOffer -> offers.setText(offers.getText() + " (" + numOffer + " " + + (numOffer == 1 ? postFixSingle : postFixMulti) + ")")); } setGraphic(box); @@ -483,7 +481,7 @@ protected void updateItem(PaymentMethod item, boolean empty) { this.getStyleClass().add("currency-label-selected"); if (id.equals(GUIUtil.SHOW_ALL_FLAG)) { - setText("▶ " + Res.get("list.currency.showAll")); + setText(Res.get("list.currency.showAll")); } else { setText(Res.get(id)); } @@ -516,7 +514,7 @@ protected void updateItem(PaymentMethod item, boolean empty) { box.getChildren().addAll(paymentType, paymentMethod); if (id.equals(GUIUtil.SHOW_ALL_FLAG)) { - paymentType.setText("▶"); + paymentType.setText(Res.get("shared.all")); paymentMethod.setText(Res.get("list.currency.showAll")); }