optifine icon indicating copy to clipboard operation
optifine copied to clipboard

[Feature Request] Adhere to system theme.

Open RokeJulianLockhart opened this issue 2 years ago • 8 comments

  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

RokeJulianLockhart avatar Sep 05 '23 19:09 RokeJulianLockhart

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

SilentWhisperer avatar Sep 05 '23 19:09 SilentWhisperer

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-43 avatar Sep 05 '23 19:09 Ari-43

  1. https://github.com/sp614x/optifine/issues/7548#issuecomment-1707201502

    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. https://github.com/sp614x/optifine/issues/7548#issuecomment-1707218216

    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.

RokeJulianLockhart avatar Sep 05 '23 21:09 RokeJulianLockhart

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.

omerien avatar Nov 22 '23 07:11 omerien

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.

Ari-43 avatar Feb 24 '24 02:02 Ari-43

https://github.com/sp614x/optifine/issues/7548#issuecomment-1962218440

@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_CURRENT_DESKTOP. 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.

RokeJulianLockhart avatar Feb 24 '24 02:02 RokeJulianLockhart

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

Ari-43 avatar Feb 24 '24 03:02 Ari-43

https://github.com/sp614x/optifine/issues/7548#issuecomment-1962238131

Per https://discuss.kde.org/t/how-to-make-java-guis-adhere-to-the-current-qt-theme/10813/2?u=rokejulianlockhart, https://github.com/sp614x/optifine/issues/7548#issuecomment-1962218440 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.

RokeJulianLockhart avatar Feb 24 '24 15:02 RokeJulianLockhart