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

The output is not dimmed-out properly in a multi-screen scenario if both text and an sf symbol are used #249

Closed
fabiospampinato opened this issue Dec 3, 2021 · 3 comments
Labels
bug Something isn't working
Milestone

Comments

@fabiospampinato
Copy link

fabiospampinato commented Dec 3, 2021

When using multiple monitors only the one currently in focus has its menubar rendered normally, other other ones have theirs dimmed out, so everything that was previously ~white becomes ~gray.

This doesn't work right if in a swiftbar plugin I'm outputting both an sf symbol and some text:

Screen Shot 2021-12-02 at 20 01 01

As you can see for whatever reason the text is not dimmed out.

I'm not sure if this is a problem with the OS or with SwiftBar though.

@melonamin
Copy link
Contributor

melonamin commented Dec 4, 2021

Weird, tempted to say that this is an OS bug since I'm using only standard components.

Googling doesn't help much, I'll try to open a Radar.

@melonamin
Copy link
Contributor

Swiftbar uses NSButton's attributedTitle for all text, this is how it looks on a second monitor:

CleanShot 2021-12-04 at 16 05 48

What is weird is that '2' is dimmed, but '3' and '4' are not.

This is what I see when I switch to NSButton's title:

CleanShot 2021-12-04 at 16 08 21

Everything is properly dimmed, so the issue is in combination of:

  • attributedTitle and NSButton's image property
  • attributedTitle with embedded image

🤔🤔🤔

@melonamin melonamin added the bug Something isn't working label Dec 4, 2021
@melonamin
Copy link
Contributor

Fixed default text color by switching from NSColor.labelColor to NSColor.controlTextColor which honors dimming.

Not sure how to fix this for custom colors, but I assume it is a rare enough case to ignore it.

@melonamin melonamin added this to the 1.4.1 milestone Dec 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants