-
-
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
Dark Theme Visibility Fixes #5646
Conversation
Sorry if I did anything wrong, this is my first pull request on a public repo. Also happy birthday if you're reading this dad! |
scripts/generate-authors.sh
Outdated
@@ -52,6 +52,7 @@ cd "$(dirname "$(readlink -f "$BASH_SOURCE")")/.." | |||
Samin Muhammad Ridwanul Karim | |||
Stefan Robert | |||
Bernhard Tempel | |||
Samuel Robertson |
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.
No need to add yourself. You'll be added correctly by generate-authors.sh
based on the data in your commit, In this place in generate-authors.sh
, the authors contributing in our subversion times on sourceforge are tracked. With git, we don't need that system any more.
Thank you very much for your contribution! 🥇 Looks good to me! Would you mind fixing the preview (ciation styles) panel for OpenOffice/LibreOffice as well? This is the same one as in the entry editor, so it should be easy to adapt. |
Just for clarification: @Siedlerchr is referring to the issue mentioned here: |
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 first contribution!
The changes look good to me, but I have two suggestions that make the code a bit more maintainable in the future.
@@ -64,3 +64,16 @@ | |||
-fx-background-color: -fx-light-text-color, -fx-control-inner-background; | |||
} | |||
|
|||
.scroll-bar:horizontal .track, |
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.
Similar code is already in the Base.css
file:
jabref/src/main/java/org/jabref/gui/Base.css
Lines 704 to 717 in 5376dcf
.scroll-bar:horizontal .track, | |
.scroll-bar:vertical .track { | |
-fx-background-color: -jr-scrollbar-track; | |
-fx-opacity: 0.6; | |
-fx-background-radius: 0em; | |
} | |
.scroll-bar:horizontal .thumb, | |
.scroll-bar:vertical .thumb { | |
-fx-background-color: -jr-scrollbar-thumb; | |
-fx-background-insets: 0, 0, 0; | |
-fx-background-radius: 0em; | |
} |
Thus, it should be sufficient if you overwrite the following color specifications:
jabref/src/main/java/org/jabref/gui/Base.css
Lines 89 to 91 in 5376dcf
/* Specs for the scrollbars */ | |
-jr-scrollbar-thumb: derive(-fx-outer-border, -30%); | |
-jr-scrollbar-track: derive(-fx-control-inner-background, -10%); |
here in the
root
part of Dark.css
.
@@ -30,13 +30,12 @@ | |||
} | |||
|
|||
.numberColumn > .hits:any-selected { | |||
-fx-background-color: derive(-jr-green, 70%); | |||
-fx-background-color: derive(-jr-gray-3, 70%); |
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.
With these changes, the number column is now also displayed in gray in the light theme. This is probably also not that readable.
I would propose to add two colors (-jr-groups-any-hits
and -jr-groups-all-hits
), which are used here. Then the dark theme can overwrite them.
Thanks so much for the feedback everyone!
|
What do you mean with the following?
The method allows you to load the |
Because it checks if "Dark.css" is passed in as an argument and switches to dark theme if it is, it needs a string that says which theme is active for it to change according to what theme the user selected. Testing right now, will update my pull requests later today with that addition and your earlier suggestions. |
Edited dark theme scrollbar fix to dark.css to overwrite color -jr-scrollbar-thumb and -jr-scrollbar-track in dark.css. Switched base theme background for group selection number highlight back to green. Added dark theme to OO/Libreoffice style selection pane. fixes #5646
In the Style Select DialogView you have access to the preferences via the Preferences Service which is a wrapper (for dependency injection via the FXML loader) for the JabRefPreferences. |
Edited dark theme scrollbar fix to dark.css to overwrite color -jr-scrollbar-thumb and -jr-scrollbar-track in dark.css. Switched base theme background for group selection number highlight back to green. Added dark theme to OO/Libreoffice style selection pane. fixes #5646
Hey, many thanks once again for everyone's feedback! Attached is a screenshot displaying the changes to scrollbar and group selected indicator (visually unchanged since first commit) and the OO style selection dialog view. [] Tests created for changes |
This looks good! Thanks for the follow-up. I think you latest commit reverted the changes in the previous commit ageofadz@b812b62. You can use git cherry-pick to integrate these changes as well. |
To fix that, should I use |
Mr. @koppor git wizard, can you please assist with the git issue. |
If it is only the commit b812b62, |
changelog.md (63) StyleSelectDialogView (83-84)
I think a |
You pushed it to your master branch but not to the base branch of this PR. |
This looks good now. Thanks again and looking forward to your next PR 😄 ! |
Couldn’t wish for a better first PR. Learned a lot and had a blast, I’m stoked to do many more. |
3a6a0a7 Update masarykova-univerzita-pravnicka-fakulta.csl (#5655) 136653a Corrections for Conservation Biology style (#5661) af148f8 Update biophysics-and-physicobiology.csl (#5646) 8842ed1 Create production-and-operations-management.csl (#5654) 6b4965f update style file (#5656) e5f6066 Update to Ruby 3.0.2 (#5657) 61c530c Reindent/reorder (#5653) 118c217 Update gems (#5652) 46cd9ab harvard-university-of-bath.csl: correct et-al-min (#5651) 37ba705 Create focaal-journal-of-global-and-historical-anthropology.csl (#5649) e22b8a5 Create developmental-medicine-and-child-neurology.csl (#5644) f7bc32c Bump nokogiri from 1.11.4 to 1.12.5 (#5640) git-subtree-dir: buildres/csl/csl-styles git-subtree-split: 3a6a0a7
There had been some visibility issues with the interface when in dark theme.
Changed the color of the vertical scroll bar in dark mode to allow it to be more visible against the other colors.
Changed the color of the accent behind the number selected which appears in the group tree when an item in a group is selected to allow for the number inside to be more readable.
fixes #5522
Then:
Now: