helge17 / tuxguitar

Improve TuxGuitar and provide builds
Other
414 stars 36 forks source link

TuxGuitar doesn't pick up Win10's theme settings (dark theme) #27

Open kainah opened 1 year ago

kainah commented 1 year ago

It seems that on the latest snapshot as of now (2023-05-02) neither the SWT, nor the JavaFX (Qt5) versions can change the style based on Windows (10, at least) settings. So the app uses the light style instead, which looks out of place. I would expect that from SWT, but since JavaFX is tied to Qt libraries, I think it might be possible to link the styles in TuxGuitar and Win somehow. Helgar @helge17 mentioned that TuxGuitar can actually pick up *nix style settings (he uses KDE). Not a big deal, but maybe it's worth looking into, if possible.

Also, JavaFX under Win10 even looks worse than the SWT version, too much space wasted everywhere. But I think it would be manageable if TuxGuitar had any working style settings beside the icon theme. (or if there was an utility to system-wide edit the Qt5 style, but I'm not sure if there is any way to change those settings on Win)

I'm attaching both JavaFX (Qt5) and SWT versions screenshots.

Qt5

SWT

guiv42 commented 1 year ago

I'm not sure I have fully understood the description of this issue, but fore sure there is a problem about themes, and not only in Windows configuration. I'm running Linux (OpenSuse tumbleweed / KDE), and selection of "Oxygen-dark" theme switches only the foreground color of icons in the tools panel, not the background color. White icons on top of a clear grey background... it's just unusable! See screenshots: 1st is Oxygen, 2nd is Oxygen-dark Oxygen Oxygen_dark

helge17 commented 1 year ago

The icon set in "Oxygen-dark" is for when you put your desktop in dark mode, but it doesn't turn dark mode on automatically.

So you have to switch your KDE to dark mode first, then TuxGuitar will be black too (same on macOS). Now you can select the "Oxygen-dark" theme to see the light icons on the dark background. I added a dark preview a few days ago, see https://github.com/helge17/tuxguitar/blob/master/TuxGuitar/share/skins/Oxygen-dark/skin-preview.png .

But the dark mode has some problems, for example:

guiv42 commented 11 months ago

an interesting project: https://github.com/Dansoftowner/jSystemThemeDetector

guiv42 commented 1 month ago

Two different things needed to make dark mode work correctly

  1. Background color With the exception of the tablature itself, background color of all graphical elements (menus, dialogs, buttons, toolbar, etc.) is defined by SWT. Not by TuxGuitar code. So until SWT can handle properly the Windows dark mode, unfortunately I think there's nothing we can do.

  2. Foreground color Foreground color of text (menu items, buttons, etc.) is also defined by SWT. Same issue as background color. Foreground color of buttons is defined by TuxGuitar, in the different skins. We could imagine to detect dynamically if current mode is bright/dark, and switch skin accordingly. While I think this could be done currently in Linux/macOS environment, it's not possible in Windows.

HaegarTheHorrible commented 1 month ago

Is there no easy fix? Having a bright and white app, while everything else is dark themed, is killing me.

guiv42 commented 1 month ago

@HaegarTheHorrible: sorry, if there was an easy fix this would have been implemented already! (this issue is more than 1 year old, the oldest open issue in this repo) See my analysis (updated this week): I do believe this problem is an Eclipse SWT issue. If I'm right I think there's just nothing I can do :(