-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Scrollbar invisible in Preferences -> BibTex Key Pattern (#4287) #4398
Conversation
pavlapp
commented
Oct 22, 2018
•
edited
Loading
edited
- fix invisible scrollbar in preferences
- divided gridpane to multiple columns
- Change in CHANGELOG.md described
- Tests created for changes
- Manually tested changed features in running JabRef
- Screenshots added in PR description (for bigger UI changes)
- Ensured that the git commit message is a good one
- Check documentation status (Issue created for outdated help page at help.jabref.org?)
* 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
@@ -81,11 +78,11 @@ private void buildGUI() { | |||
gridPane.add(defaultPat, 2, rowIndex); | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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!
@@ -11,6 +11,15 @@ | |||
-fx-padding: 0em 1em 0em 3em; | |||
} | |||
|
|||
.preferencePaneContainer .scroll-bar { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you look at my solution? Is it enough generalized?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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) ...