Scrollbar invisible in Preferences -> BibTex Key Pattern (#4287)#4398
Conversation
* fix invisible scrollbar in preferences * divided gridpane to multiple columns
| gridPane.add(defaultPat, 2, rowIndex); | ||
| gridPane.add(button, 3, rowIndex); | ||
|
|
||
| Object[] entryTypes = EntryTypes.getAllValues(mode).toArray(); |
There was a problem hiding this comment.
You can also iterate over the list, you have to use the get(i) methods then. It has the additional advantage that you are still type safe with generics
| gridPane.add(button, 3, rowIndex); | ||
|
|
||
| Object[] entryTypes = EntryTypes.getAllValues(mode).toArray(); | ||
| List<EntryType> entryTypes = new ArrayList<>(EntryTypes.getAllValues(mode)); |
There was a problem hiding this comment.
It's already a collection, you can just loop through it, for (EntryType type : EntryTypes.getAllValues(mode)) {
Collection is the Interface for all lists/arrays etc . The rule of thumb is to (always) code against interfaces
https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html
Siedlerchr
left a comment
There was a problem hiding this comment.
Thanks, looks good to me now!
|
Could you please explain me, why is code quality and continuous-integration always failed? In quality review shows, that there is unused import of array list, but it is not true, because I removed it. |
|
If you use Eclipse and have imported the project via gradlew eclipse you can do ctrl + o to automatically fix the imports. |
tobiasdiez
left a comment
There was a problem hiding this comment.
Thanks for your contribution. Good idea to split the layout into multiple columns. The fix for the invisible scrollbar also looks good to me, but please try to generalize it so that it also applies to other dialogs. Thanks!
| -fx-padding: 0em 1em 0em 3em; | ||
| } | ||
|
|
||
| .preferencePaneContainer .scroll-bar { |
There was a problem hiding this comment.
This fixes the problem for the preferences dialog, but the problem also appears in some other dialogs. Can you please generalize your solution (does it work without the .preferencePaneContainer selector?) and move it to the base.css. Thanks!
There was a problem hiding this comment.
Can you look at my solution? Is it enough generalized?
tobiasdiez
left a comment
There was a problem hiding this comment.
Thanks for the quick follow-up!
* upstream/master: (30 commits) Update README.md (#4419) Fix generate bibtex key overwrite warning dialog (#4418) Fix group hit counter when adding entries (#4413) Update README.md fix java.nio.file.FileSystemNotFoundException and reorganize code (#4416) fixed an issue where corresponding groups are sometimes not highlighted when clicking on entries (#4404) Add a few journal abbreviations (#4412) Fix display of radio buttons (#4411) Update issue templates Delete ISSUE_TEMPLATE.md Update issue templates Integrate mrdlib redesign (#4361) fix "save" button in preference dialog not response (#4406) show dialog before creating entry (#4405) Scrollbar invisible in Preferences -> BibTex Key Pattern (#4287) (#4398) Updates (#4402) Fixes for all mods exporter tests (#4396) Fix EntryType dialog not closed after generate button (#4390) Make rank image narrower (#4395) Fix showing multiple icons for one menu entry - fixes #4384 (#4392) ...
* upstream/master: (54 commits) Update README.md (#4419) Fix generate bibtex key overwrite warning dialog (#4418) Fix group hit counter when adding entries (#4413) Update README.md fix java.nio.file.FileSystemNotFoundException and reorganize code (#4416) fixed an issue where corresponding groups are sometimes not highlighted when clicking on entries (#4404) Add a few journal abbreviations (#4412) Fix display of radio buttons (#4411) Update issue templates Delete ISSUE_TEMPLATE.md Update issue templates Integrate mrdlib redesign (#4361) fix "save" button in preference dialog not response (#4406) show dialog before creating entry (#4405) Scrollbar invisible in Preferences -> BibTex Key Pattern (#4287) (#4398) Updates (#4402) Fixes for all mods exporter tests (#4396) Fix EntryType dialog not closed after generate button (#4390) Make rank image narrower (#4395) Fix showing multiple icons for one menu entry - fixes #4384 (#4392) ...
Uh oh!
There was an error while loading. Please reload this page.