Skip to content

Conversation

@gitmichaelqiu
Copy link

If current system >= 26, use NSGlassEffectView.

Opacity = 0% (with comparison of NSVisualEffectView):
Opacity_0

Opacity = 20%:
Opacity_20

Opacity = 50%:
Opacity_50

@aviwad
Copy link
Owner

aviwad commented Oct 18, 2025

Awesome. I'll give it a try.

@gitmichaelqiu
Copy link
Author

Found an issue: in the light appearance, if the opacity <30%, because the lyrics are white, the readability will be awful. Sorry, when I was editing, I only tested the dark appearance.

Opacity=0%:

Screenshot 2025-10-19 at 09 08 32

Opacity = 30%:

Screenshot 2025-10-19 at 09 10 29

Although with an opacity of 30% and a white appearance, the "Liquid Glass" effect is barely visible.

So my solution is to use foregroundStyle(.primary) for lyrics and remove .preferredColorScheme(.dark) in FloatingPanel.swift to make it effective:

Opcity = 30%:

Screenshot 2025-10-19 at 09 23 42

Opcity = 0%:

Screenshot 2025-10-19 at 09 23 56

Remove preferred dark scheme for floating panel
@aviwad
Copy link
Owner

aviwad commented Oct 23, 2025

Hmm... not a good fix... I generate the color to ensure legibility with white text. (the color I fetch from Spotify is also generated with the use case of having enough contrast against white text). Perhaps we can set a dark mode color scheme on whatever container is holding the NSGlassView? Not sure how to set that in AppKit

@aviwad
Copy link
Owner

aviwad commented Nov 5, 2025

Sorry if the previous comment sounded rude. I'm still trying to find a workaround, to force dark mode on the karaoke view's glass. I'm trying to wrap the NSHostingView inside an NSGlassEffectView so the glass is aware of the contents.
image

The problem now comes with communicating the NSHostingView's size changes to the GlassEffectView. I'll figure this out soon. Thank you for the PR!

@gitmichaelqiu
Copy link
Author

gitmichaelqiu commented Nov 5, 2025

No worries. I am not offended at all. 😄

And sorry for the late reply, I have edited the code locally and forgot to sync commits to GitHub 😅.

I was working on rewriting the code in SwiftUI because it automatically manages the font/background colors. The current work, in my opinion, looks wonderful!

CleanShot.2025-11-05.at.17.13.36.mp4

When the transparency > 35%, the code forces the foregroundStyle to be white. Otherwise, it is adjusted by SwiftUI.

I have committed the code; only KaraokeView.swift is modified. Currently, there is a drag when a small Karaoke window is expanded to a larger one, because of the default animation of the Liquid Glass (I am finding ways to disable it).

Except that, no obvious bugs are observed.

@gitmichaelqiu
Copy link
Author

gitmichaelqiu commented Nov 5, 2025

By the way, because I merged my old branch with your newest one, some other files have changed (to your newest code). I have only changed KaraokeView.swift.

@gitmichaelqiu
Copy link
Author

Lemme know if the new method works for you!

@aviwad
Copy link
Owner

aviwad commented Dec 7, 2025

Ahh I'm so sorry I haven't been able to review this in time! I graduate in a couple days. I'll take a look soon-ish! Sorry for the wait.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants