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

Option to use System Preference for Light/Dark Theme (Win/Lin/OSX) #8729

Closed
dupontinquiries opened this issue Apr 26, 2022 · 13 comments · Fixed by #10593
Closed

Option to use System Preference for Light/Dark Theme (Win/Lin/OSX) #8729

dupontinquiries opened this issue Apr 26, 2022 · 13 comments · Fixed by #10593

Comments

@dupontinquiries
Copy link

dupontinquiries commented Apr 26, 2022

Is your suggestion for improvement related to a problem? Please describe.

I would appreciate a way to automatically apply either a light or dark theme whenever I switch my light/dark theme in my MacOS system preferences. Sometimes I am using an eink monitor and I prefer light themes because they are easier to read on eink IMO, and other times I am on an LCD panel monitor and do not want to hurt my eyes with a light mode (I want dark mode here).

Describe the solution you'd like

Could a radio button be added to the Appearance section of the settings dialog that says "Use System Default"?

Additional context

I would prefer a solution that does not require a program restart, but this may be easier or just a good first step to aim for.

Thank you to everyone who has contributed to this software!

@ekirchman
Copy link

On Linux, it would be great if Jabref respected freedesktop.org's color scheme preference as well. It's universal across almost all Linux desktops now, so there should be no need to make the code specific to any one desktop or theme

@dupontinquiries
Copy link
Author

On Linux, it would be great if Jabref respected freedesktop.org's color scheme preference as well. It's universal across almost all Linux desktops now, so there should be no need to make the code specific to any one desktop or theme

I agree that JabRef should have Linux support, although I am not sure if this should be a separate ticket as my OP was about accessibility on MacOS.

@Siedlerchr
Copy link
Member

Needs to be done for each OS individually (as there is not yet a java/javafx API for doing this): Ideally using already existing tools see for example as an idea: (
https://gist.github.com/HanSolo/7cf10b86efff8ca2845bf5ec2dd0fe1d

@shafinkamal
Copy link
Contributor

shafinkamal commented Oct 17, 2022

Hello, could I please be assigned to this issue? I'd like to make an attempt on it. Could someone please also let me know where would be the ideal place in the codebase to place the listener so that it can listen in the background for changes in MacOS System Preferences?

@Siedlerchr
Copy link
Member

@shafinkamal I would just check this once on startup or in the preferences. There needs to be an option to override the automatic detection

@koppor koppor added the good first issue An issue intended for project-newcomers. Varies in difficulty. label Apr 24, 2023
@aqurilla
Copy link
Contributor

Hi, I would like to take up this issue

@Siedlerchr Siedlerchr removed the good first issue An issue intended for project-newcomers. Varies in difficulty. label Jun 13, 2023
@Siedlerchr
Copy link
Member

@aqurilla Thanks for your interest, there is already a good external library https://github.com/Dansoftowner/jSystemThemeDetector however, due to the method too large exception we could not integrate it :(

@ThiloteE ThiloteE added status: depends-on-external A bug or issue that depends on an update of an external library status: freeze Issues posponed to a (much) later future labels Jun 13, 2023
@ThiloteE
Copy link
Member

ThiloteE commented Jun 13, 2023

Then let's remove this from "free to take" in good first issues and candidates for university projects for now.

@aqurilla
Copy link
Contributor

@Siedlerchr no problem, I'll try one of the other issues

@Siedlerchr
Copy link
Member

@calixtus It uses the Process cmd exec stuff while this one uses jna https://github.com/Dansoftowner/jSystemThemeDetector/blob/master/src/main/java/com/jthemedetecor/WindowsThemeDetector.java

@koppor koppor removed the os: macOS label Jun 29, 2023
@koppor koppor changed the title Option to use System Preference for Light/Dark Theme Option to use System Preference for Light/Dark Theme (Win/Lin/OSX) Jun 29, 2023
@calixtus calixtus self-assigned this Jul 17, 2023
@Siedlerchr Siedlerchr reopened this Sep 14, 2023
@tobiasdiez tobiasdiez removed status: depends-on-external A bug or issue that depends on an update of an external library status: freeze Issues posponed to a (much) later future labels Oct 16, 2023
@tobiasdiez
Copy link
Member

tobiasdiez commented Oct 16, 2023

With the recent progress, the JDK issue shouldn't pose a problem anymore and we can use https://github.com/Dansoftowner/jSystemThemeDetector now. For anyone interested in working on this, the PR #9263 might be a good starting point

@EthanYifanJu
Copy link
Contributor

Hello, I have a university assignment right now. Can I give it a try?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment