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

Fix persisting colors on macOS [Fix #1564] #1563

Closed
wants to merge 1 commit into from

Conversation

karlingen
Copy link

@karlingen karlingen commented Oct 1, 2021

We are not persisting the custom colors to REAPER.ini on macOS for some reason. The user has to restore the custom colors every time Reaper is restarted. This fixes #1564

It would be nice with an explanation as to why we weren't doing this in the first place and if I might have missed something vital.

@karlingen karlingen changed the title Fix persisting colors on macOS Fix persisting colors on macOS [Fix #1564] Oct 1, 2021
@cfillion
Copy link
Member

cfillion commented Oct 1, 2021

On macOS the custom colors should be saved into the user's global favorite color palette rather than the in the .ini. The root cause of the bug is SetCustomColors failing to save the colors to the system palette on high sierra and newer.

I wrote a potential fix, could you give 84621f5 a try?

@karlingen
Copy link
Author

@cfillion Just gave it a go. It works! It also fixed the custom color picker 😃
Awesome work man!

Can we get a PR up for it? I'll close this one

@karlingen karlingen closed this Oct 1, 2021
@karlingen
Copy link
Author

@cfillion Also for future reference, where are all of the NSFavoriteColorsStore and related APIs documented?

@cfillion
Copy link
Member

cfillion commented Oct 1, 2021

Where are all of the NSFavoriteColorsStore and related APIs documented?

They aren't documented as far as I could find. Seems to be a private Apple API (could break again in future updates). I found those functions and classes by reverse-engineering how the system color picker saves the colors.

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.

Custom colors are not persisted after reaper restart on macOS
2 participants