jacquesh / foo_openlyrics

An open-source lyric display panel for foobar2000
MIT License
450 stars 26 forks source link

Follow the foobar light or dark color mode #316

Closed username116 closed 2 months ago

username116 commented 1 year ago

Hi,

The lyrics panel does not follow foobar's color mode when changing light or dark mode. I'm using Columns UI. With Default UI, it's even stranger: the colors are reversed.

video with Columns UI https://github.com/jacquesh/foo_openlyrics/assets/108369600/17b1247d-0bb2-4ae1-aa5e-9ed0096252c1
video with Default UI https://github.com/jacquesh/foo_openlyrics/assets/108369600/02c21d50-6b31-4870-8b9e-4505c80f38c7

Steps to reproduce

  1. File > Preferences > Display > Columns UI > Colors and fonts > Mode tab or File > Preferences > Display > Default User Interface > Colors and Fonts > Dark Mode
  2. Change color mode
  3. Lyrics panel colors do not change in Columns UI, and are reversed in Default UI.

Expected behavior

Lyrics panel colors should follow foobar's color mode.

Versions

Debug logs

(in Columns UI) There's nothing in the console when the color mode is changed, even with 'Debug logging enabled'.

When I launch the song, the console says this:

console ``` Opening track for playback: "D:\Audio\Musique\Pop, rock\Aldous Harding\2014 - Aldous Harding\08. Small bones of courage.flac" INFO-OpenLyrics: LyricPanel::compute_background_image took 1316us ReplayGain DSP in track mode INFO-OpenLyrics: No search avoidance info available for track INFO-OpenLyrics: Searching for lyrics for artist='Aldous Harding', album='Aldous Harding', title='Small bones of courage'... INFO-OpenLyrics: Searching for lyrics in tag: 'LYRICS' INFO-OpenLyrics: Found lyrics in tag: 'LYRICS' INFO-OpenLyrics: Searching for lyrics in tag: 'SYNCEDLYRICS' INFO-OpenLyrics: Searching for lyrics in tag: 'UNSYNCEDLYRICS' INFO-OpenLyrics: Searching for lyrics in tag: 'UNSYNCED LYRICS' INFO-OpenLyrics: Successfully retrieved lyrics from source: Metadata tags INFO-OpenLyrics: Parsing lyrics text... INFO-OpenLyrics: Loaded lyrics already form a valid UTF-8 sequence INFO-OpenLyrics: Parsing LRC lyric text... INFO-OpenLyrics: Lyric loading complete INFO-OpenLyrics: Skipping lyric save. Type: 1, Local: yes, Timestamped: no, Autosave: 0 ReplayGain DSP: gain data is missing. DSP managed to scan 105.5 seconds of the track and will use the scanned data as estimate. Found gain -4.31 dB ```

Additional information

The panel is in a tab in Columns UI. There is only one lyrics panel. When I restart foobar, the lyrics panel colors change to the correct colors.

Here are the settings:

settings ![screenshot](https://github.com/jacquesh/foo_openlyrics/assets/108369600/44fd7fab-9b5a-4512-96a5-da723ed2eb85) ![screenshot 2](https://github.com/jacquesh/foo_openlyrics/assets/108369600/0c2611ea-679a-42ba-9f1d-0bfb715a3b53)
jacquesh commented 1 year ago

That's very strange, we don't really do much in terms of darkmode handling, we just tell fb2k to make whatever changes it needs. In this case that's just flipping the colour it gives you when you ask for the "UI background colour".

I did a quick test and I do not see this on my machine (it works as expected). It could be a bug in the recent/beta fb2k releases? Can you please try with default UI with the latest stable version of fb2k (v2.0) and see if you get the same result?

username116 commented 1 year ago

I installed (downgraded to) foobar v2.0 over my old installation. Same thing.

video with Columns UI https://github.com/jacquesh/foo_openlyrics/assets/108369600/0b1c2219-0212-4658-871e-da67a2b8f763
other settings with Columns UI ![Capture d'écran 356 foobar2000](https://github.com/jacquesh/foo_openlyrics/assets/108369600/c05b89a2-f781-42ea-a6f2-663157ba6b1d) ![Capture d'écran 355 foobar2000](https://github.com/jacquesh/foo_openlyrics/assets/108369600/20cc6f65-7029-448e-9fca-14db90fecebe) ![Capture d'écran 357 foobar2000](https://github.com/jacquesh/foo_openlyrics/assets/108369600/c78e29ed-1423-4f35-8990-6278054ea923) ![Capture d'écran 358 foobar2000](https://github.com/jacquesh/foo_openlyrics/assets/108369600/6a561930-5d5b-4957-96c7-389da4a0bd77)
video with Default UI https://github.com/jacquesh/foo_openlyrics/assets/108369600/22601195-f130-4528-8e9b-3271d79e7795

I tried with a new clean portable installation with foobar v2.0, OpenLyrics v1.8 and Columns UI v2.1.0, without any settings except the layout to insert the lyrics panel. It's the same thing (but once it worked fine). Maybe you need to (re)start foobar after setting the color mode to "Use system setting"? I don't know.

video with foobar v2.0 portable + Columns UI https://github.com/jacquesh/foo_openlyrics/assets/108369600/d74e4190-c595-4b13-b7b4-66ac093d6464
video with foobar v2.0 portable + Default UI https://github.com/jacquesh/foo_openlyrics/assets/108369600/fd90cb80-1e0f-448e-a5f5-796d97edb3ea
username116 commented 1 year ago

I can reproduce the issue on my portable installation (foobar v2.0 x86 and Columns UI v2.1.0) with OpenLyrics v1.7, with Columns UI and Default UI, but I can't reproduce it with OpenLyrics v1.6. So it seems to me that the origin is somewhere between OpenLyrics v1.6 and OpenLyrics v1.7.

username116 commented 2 months ago

Hi,

I tried v1.10. The color change is fixed with Default UI, but not with Columns UI.

video with Default UI

https://github.com/user-attachments/assets/2455362d-a34d-4582-8fa6-c5173c24a2d7

video with Columns UI

https://github.com/user-attachments/assets/fdf0d23e-bd85-4b64-8982-3f4acf588a7e

I tried with a new portable installation, foobar2000 v2.1.5 x86 portable, OpenLyrics v1.10.2, Columns UI v2.1.0. I haven't touched the Columns UI settings, so it has the default settings.

Settings

![Screenshot 1](https://github.com/user-attachments/assets/ab6568df-1815-495f-99dd-a001696a4ea8) ![Screenshot 2](https://github.com/user-attachments/assets/ee385fe2-da2f-40ae-949b-27b2a35bea41) ![Screenshot 3](https://github.com/user-attachments/assets/a6d70c51-0b51-4ddb-8474-a67a4b9911d5)

I saw this: Columns UI SDK - Dark mode (excuse me if you've already seen it.)

Other than that, thanks for your work and for the new features in the latest version.

jacquesh commented 2 months ago

Oh I wasn't aware of those instructions for ColumnsUI dark mode handling. Thanks for that!

username116 commented 2 months ago

I tried v1.11 . The color change works with Default UI and Columns UI. That's great, thanks!