Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix arbitrator language selection #1771

Merged

Conversation

devinbileck
Copy link
Member

To prevent the issue mentioned in
bisq-network#354 where using arrow keys
to navigate the combobox would add the first language, utilize the
onHiding event rather than onAction event. This will add the selected
language when the combobox is closing.
After selecting a language from the combobox, it would no longer
display the prompt text and instead would be blank.

As per the documentation
https://docs.oracle.com/javase/10/docs/api/javafx/scene/control/ComboBoxBase.html#promptTextProperty:
> Prompt text is not displayed in all circumstances, it is dependent
> upon the subclasses of ComboBoxBase to clarify when promptText will be
> shown.

Therefore, use a custom buttonCell on the combo box to display the
prompt text.
@devinbileck
Copy link
Member Author

I just realized the same issue exists with the comboboxes for adding currencies and altcoins in the preferences view. Not sure yet if there are others. I will enter a separate PR to address those.

@ManfredKarrer
Copy link
Contributor

I assume same issue will happen at comboboxes as they use internally a popup (new stage). Will require probably to overwrite base classes...

@devinbileck
Copy link
Member Author

It only affects comboboxes that intentionally clear their value once you make a selection. So far, I believe it only affects just these 3 comboboxes mentioned.

@ripcurlx
Copy link
Contributor

ACK - looking good. Thanks for the fix @devinbileck! It is kind of tricky with prompt text and comboboxes. I also ran into some issues during the re-design. But your workaround helps to fix this issue at least.

@ripcurlx ripcurlx merged commit 866ea00 into bisq-network:master Oct 16, 2018
@devinbileck devinbileck deleted the fix-arbitrator-language-selection branch October 16, 2018 22:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants