Email or username:

Password:

Forgot your password?
Top-level
Lukas Petr

The difference between the vibrant appearance from last year (iOS widgets on the macOS desktop) is that for the tint mode, the opacity of views is used to render the widget.

You can use the \.widgetRenderingMode environment variable and check for '.accented' to detect this mode.

1 comment
Lukas Petr

To quickly convert from a view's color to opacity, you can add the .luminanceToAlpha() view modifier. The problem is that it will change the opacity even in normal (non-tinted) mode. So I created a custom view modifier that only applies this filter if we're in the tinted mode.

Go Up