mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-24 23:18:17 +01:00
Fix spacing in secondary navigation when DAO is not enabled
This commit is contained in:
parent
64aec44b16
commit
d278e193c9
1 changed files with 7 additions and 1 deletions
|
@ -184,9 +184,13 @@ public class MainView extends InitializableView<StackPane, MainViewModel> {
|
||||||
JFXBadge portfolioButtonWithBadge = new JFXBadge(portfolioButton);
|
JFXBadge portfolioButtonWithBadge = new JFXBadge(portfolioButton);
|
||||||
JFXBadge disputesButtonWithBadge = new JFXBadge(disputesButton);
|
JFXBadge disputesButtonWithBadge = new JFXBadge(disputesButton);
|
||||||
|
|
||||||
|
final Region daoButtonSpacer = getNavigationSpacer();
|
||||||
|
|
||||||
if (!BisqEnvironment.isDAOActivatedAndBaseCurrencySupportingBsq()) {
|
if (!BisqEnvironment.isDAOActivatedAndBaseCurrencySupportingBsq()) {
|
||||||
daoButton.setVisible(false);
|
daoButton.setVisible(false);
|
||||||
daoButton.setManaged(false);
|
daoButton.setManaged(false);
|
||||||
|
daoButtonSpacer.setVisible(false);
|
||||||
|
daoButtonSpacer.setManaged(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
root.sceneProperty().addListener((observable, oldValue, newValue) -> {
|
root.sceneProperty().addListener((observable, oldValue, newValue) -> {
|
||||||
|
@ -197,6 +201,8 @@ public class MainView extends InitializableView<StackPane, MainViewModel> {
|
||||||
if (BisqEnvironment.getBaseCurrencyNetwork().isBitcoin()) {
|
if (BisqEnvironment.getBaseCurrencyNetwork().isBitcoin()) {
|
||||||
daoButton.setVisible(true);
|
daoButton.setVisible(true);
|
||||||
daoButton.setManaged(true);
|
daoButton.setManaged(true);
|
||||||
|
daoButtonSpacer.setVisible(true);
|
||||||
|
daoButtonSpacer.setManaged(true);
|
||||||
}
|
}
|
||||||
} else if (Utilities.isAltOrCtrlPressed(KeyCode.DIGIT1, keyEvent)) {
|
} else if (Utilities.isAltOrCtrlPressed(KeyCode.DIGIT1, keyEvent)) {
|
||||||
marketButton.fire();
|
marketButton.fire();
|
||||||
|
@ -258,7 +264,7 @@ public class MainView extends InitializableView<StackPane, MainViewModel> {
|
||||||
HBox.setHgrow(primaryNav, Priority.SOMETIMES);
|
HBox.setHgrow(primaryNav, Priority.SOMETIMES);
|
||||||
|
|
||||||
HBox secondaryNav = new HBox(disputesButtonWithBadge, getNavigationSpacer(), settingsButton,
|
HBox secondaryNav = new HBox(disputesButtonWithBadge, getNavigationSpacer(), settingsButton,
|
||||||
getNavigationSpacer(), accountButton, getNavigationSpacer(), daoButton);
|
getNavigationSpacer(), accountButton, daoButtonSpacer, daoButton);
|
||||||
secondaryNav.getStyleClass().add("nav-secondary");
|
secondaryNav.getStyleClass().add("nav-secondary");
|
||||||
HBox.setHgrow(secondaryNav, Priority.SOMETIMES);
|
HBox.setHgrow(secondaryNav, Priority.SOMETIMES);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue