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

[Feature Request] Adhere to system theme. #7548

Open
RokeJulianLockhart opened this issue Sep 5, 2023 · 8 comments
Open

[Feature Request] Adhere to system theme. #7548

RokeJulianLockhart opened this issue Sep 5, 2023 · 8 comments

Comments

@RokeJulianLockhart
Copy link

RokeJulianLockhart commented Sep 5, 2023

  1. Description of the new feature

    My desktop environment is cpe:/o:kde:plasma:5.27.10 on cpe:/o:opensuse:tumbleweed:20240220. Using the https://invent.kde.org/plasma/breeze.git theme, the current installer GUI looks like:

    image

    ...despite it not adhering to the system colouration:

    1. image

    2. image

    ...nor typographic preferences:

    1. image

    2. image

@SilentWhisperer
Copy link

that would require adding additional code just for the OS you're using

@Ari-RERA-43
Copy link

While this would be nice to have, it would likely not be worth the effort for an installer you only see once and awhile.

@RokeJulianLockhart
Copy link
Author

RokeJulianLockhart commented Sep 5, 2023

  1. [Feature Request] Adhere to system theme. #7548 (comment)

    that would require adding additional code just for the OS you're using

    @SilentWhisperer, this isn't just a problem for Linux or even just KDE Plasma, because not even Windows has hardcoded system fonts – see https://superuser.com/a/859430/904401.

    You can probably (if it works) verify this using

    Get-ItemProperty -Path "Registry::HKey_Current_User\Control Panel\Desktop\WindowMetrics"
  2. [Feature Request] Adhere to system theme. #7548 (comment)

    While this would be nice to have, it would likely not be worth the effort for an installer you only see once and awhile.

    @Ari-RERA-43, it's an accessibility issue.

However, can I make font adherence a separate issue? Although they're both obviously accessibility issues, they're different problems.

@omerien
Copy link
Contributor

omerien commented Nov 22, 2023

It's platform-dependant and just for the installer. You don't even need the installer to use OptiFine. This is not likely to be added.

@Ari-RERA-43
Copy link

Recently, while troubleshooting another Java application with theming issues (this is not at all unique to OptiFine) I created a fix for this issue.
Add

export _JAVA_OPTIONS="-Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel -Dswing.crossplatformlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true"

to your ~/.xprofile or another location that will allow the variable to be inherited by all processes in your desktop session. Your desktop's application autostart feature may work, but if it has a dedicated place to set environment variables (For KDE: 'Session Environment Variables' in the docs), use that. For QT-centric desktop environments like KDE Plasma you may need to additionally set up a GTK theme.

@RokeJulianLockhart
Copy link
Author

RokeJulianLockhart commented Feb 24, 2024

#7548 (comment)

@Ari-RERA-43, KDE Plasma 5 automatically sets a correspondent GTK theme when using the Qt5 Breeze theme. Consequently, your command indeed operates:

20240224T024024GMT

I'm amazed. This should be implemented into the JRE installation script if it detects KDE or GNOME as the value of $Env:XDG_DESKTOP_TYPE. Are you willing to file an issue with Oracle for this? I've posted https://discuss.kde.org/t/how-to-make-java-guis-adhere-to-the-current-qt-theme/10813?u=rokejulianlockhart regardless.

@Ari-RERA-43
Copy link

I have never reported an issue to Oracle before so I am unfamiliar with the process, but I will look into it.

@RokeJulianLockhart
Copy link
Author

RokeJulianLockhart commented Feb 24, 2024

#7548 (comment)

Per https://discuss.kde.org/t/how-to-make-java-guis-adhere-to-the-current-qt-theme/10813/2?u=rokejulianlockhart, #7548 (comment) needs to be added to this codebase regardless of upstreaming efforts, because it is currently upstream intended behaviour. We should still, if not consequently, file a ticket to modify that.

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

No branches or pull requests

5 participants