luckymarmot/ThemeKit

Using ThemeKit introduces visual artifacts on sheet windows

LeoNatan opened this issue · 5 comments

This is a great framework!

Without ThemeKit linked in the project, everything works correctly:

notheme

However when linking ThemeKit, no matter if the light or dark themes are used, some controls exhibit visual artifacts:

lighttheme

darktheme

Now sure what is causing this.

Notice the rectangles around the disclosure buttons and the cell text fields.

Hi @LeoNatan !

Sorry for the late response, but I was trying to reproduce the issue with this apple sample code (which I couldn't). However, I know this happened to me in the past, and I know it is somehow related with vibrancy. If I remember correctly, at the time I was able to fix this by playing with the allowsVibrancy property of wither the views (NSTableView/NSOutlineView) and/or the subviews, but I confess I'm not 100% sure about this.

Are you able to recreate this on a minimal project and share the code so I can take a look?

Unfortunately, there some edge cases (like this), which sometimes may require a hack...

Thanks.

Thanks for your reply.

I'll try to play around with the vibrancy settings. The problem only occurs on sheets.
If the problem still happens after disabling the vibrancy, I'll try to reproduce it in a demo project.

Hey @LeoNatan !

Sorry for the late response, but I was able to reproduce the issue on a sample project, and provide a fix as well. Please take a look at the comment below where this is further explained!

#18 (comment)

Hope it helps!

Thanks!

With the new Dark mode, this wouldn’t be the best solution, but it’s good enough for now. I haven’t yet been able to test on Mojave to see if the issue still occurs.