Closed DominikBucher12 closed 10 months ago
Now this doesnt work on macOS, investigating why... Will fix this later, got a bigger fish to catch.
It's so strange that the toggle buttons work great in dark mode on macOS, but not in iOS.
I'll check if I can get it to work with the current approach before we merge this.
Even alignment buttons fixed in light mode!
Thank you for finding all these strange glitches.
My idea was for a developer to be able to set foregroundStyle
to an entire panel or sheet, and have all the icons adapt, but I guess we can wait with that :)
Is this ready to merge?
I will refactor this a bit (no duplicate static systemSpecificTextColor
, revert back the alignment light and dark initialiser...) and we are ready to roll... :)
I spent enormous time trying to hack SwiftUI.Picker
to work with SFSymbols but nothing, literally NOTHING, except making custom Segment Picker works... So here is my 2 cents... Lets keep alignment stack this way, otherwise everything works.
Hey @DominikBucher12 - I looked at the many things you had to do to make this work and realized that many of the views were sooo bloated, with view modifiers and styles that made it hard to affect the entire look of, say, a format sidebar.
I therefore removed a LOT of code and styles from the various views, so that you can now use foreground color, tint, accent color etc. on an entire view hierarchy and affect all toggles within. I also noticed that the palette
symbol color mode was what caused many strange icon rendering issues, so I removed it.
When I did, I noticed that the ControlGroup
ruins the highlight effect for nested toggles in iOS. I therefore hot switch out the toggle group with a toggle stack on iOS, to make it work as expected.
I've also removed the color picker color adjustment, since it made it impossible to e.c. pick a black background color in dark mode. Instead, I've added a reset button to the quick colors, which applies nil
, which now translated to .primary
to all color types, except for background, for which it applies .clear
.
I have also deprecated a bunch of styles, and moved many views into namespaces. Let's go through this PR together and see which parts we still want to add to mail
, and we can add them as smaller, separate PRs.
Looks like this tweaking SFSymbol/TintColor journey is finally over, ready to merge.
What this PR do:
How to test it
Related: https://github.com/danielsaidi/RichTextKit/issues/125
How it looks now: