Follow

My friend mentioned Telegram light/dark switcher has a neat animation, so how could i resist.

@exalm wait, how does it coordinate all widgets, do you duplicate them?

@xerz nope, only one of the 2 parts during the animation is real, the other one is a screenshot.

@xerz that’s how everyone does it. :) e.g. the crossfade in macOS is between a screenshot and the real thing as well, that’s why it just works with everything.

@dredmorbius mm, doesn't seem too useful. I mean, not only it obscures text, the part that's still light is too light to use as a dark mode.

The one in Telegram is implemented by taking a screenshot, changing the theme, overlaying the screenshot of the previous theme on top of everything and animating its clipping. A dirty hack, but it works ¯\_(ツ)_/¯

@grishka not really a hack, that’s how everyone does it. Same here as well. :p

Sign in to participate in the conversation
FLOSS.social

For people who care about, support, or build Free, Libre, and Open Source Software (FLOSS).