mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-24 07:07:43 +01:00
Use auto focus on the first input field on all screens
This commit is contained in:
parent
0b28e12905
commit
f0a985ea0d
6 changed files with 24 additions and 1 deletions
|
@ -401,6 +401,7 @@ public class TraderDisputeView extends ActivatableView<VBox, Void> {
|
|||
} catch (ParseException ignore) {
|
||||
}
|
||||
}
|
||||
GUIUtil.requestFocus(filterTextField);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -911,6 +912,7 @@ public class TraderDisputeView extends ActivatableView<VBox, Void> {
|
|||
root.getChildren().add(2, messagesAnchorPane);
|
||||
|
||||
scrollToBottom();
|
||||
GUIUtil.requestFocus(inputTextArea);
|
||||
}
|
||||
|
||||
addListenersOnSelectDispute();
|
||||
|
|
|
@ -124,8 +124,10 @@ public class DepositView extends ActivatableView<VBox, Void> {
|
|||
tableView.setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY);
|
||||
tableView.setPlaceholder(new Label(Res.get("funds.deposit.noAddresses")));
|
||||
tableViewSelectionListener = (observableValue, oldValue, newValue) -> {
|
||||
if (newValue != null)
|
||||
if (newValue != null) {
|
||||
fillForm(newValue.getAddressString());
|
||||
GUIUtil.requestFocus(amountTextField);
|
||||
}
|
||||
};
|
||||
|
||||
setSelectColumnCellFactory();
|
||||
|
@ -205,6 +207,8 @@ public class DepositView extends ActivatableView<VBox, Void> {
|
|||
updateList();
|
||||
}
|
||||
};
|
||||
|
||||
GUIUtil.focusWhenAddedToScene(amountTextField);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -241,6 +241,7 @@ public class WithdrawalView extends ActivatableView<VBox, Void> {
|
|||
inputsToggleGroup.selectToggle(useAllInputsRadioButton);
|
||||
|
||||
updateInputSelection();
|
||||
GUIUtil.requestFocus(withdrawToTextField);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -174,6 +174,8 @@ public class CreateOfferView extends ActivatableViewAndModel<AnchorPane, CreateO
|
|||
return null;
|
||||
}
|
||||
});
|
||||
|
||||
GUIUtil.focusWhenAddedToScene(amountTextField);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -156,6 +156,8 @@ public class TakeOfferView extends ActivatableViewAndModel<AnchorPane, TakeOffer
|
|||
model.onFocusOutAmountTextField(oldValue, newValue, amountTextField.getText());
|
||||
amountTextField.setText(model.amount.get());
|
||||
};
|
||||
|
||||
GUIUtil.focusWhenAddedToScene(amountTextField);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -97,6 +97,14 @@ public class GUIUtil {
|
|||
return 0;
|
||||
}
|
||||
|
||||
public static void focusWhenAddedToScene(Node node) {
|
||||
node.sceneProperty().addListener((observable, oldValue, newValue) -> {
|
||||
if (null != newValue) {
|
||||
node.requestFocus();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@SuppressWarnings("PointlessBooleanExpression")
|
||||
public static void showFeeInfoBeforeExecute(Runnable runnable) {
|
||||
//noinspection UnusedAssignment
|
||||
|
@ -448,6 +456,10 @@ public class GUIUtil {
|
|||
new Popup<>().information(Res.get("popup.warning.downloadNotComplete")).show();
|
||||
}
|
||||
|
||||
public static void requestFocus(Node node) {
|
||||
UserThread.execute(node::requestFocus);
|
||||
}
|
||||
|
||||
public static void reSyncSPVChain(WalletsSetup walletsSetup, Preferences preferences) {
|
||||
try {
|
||||
walletsSetup.reSyncSPVChain();
|
||||
|
|
Loading…
Add table
Reference in a new issue