material-decoration icon indicating copy to clipboard operation
material-decoration copied to clipboard

Determine if I should use OutCubic for Button opacity animation

Open Zren opened this issue 2 years ago • 1 comments

I currently use InOutQuad. Since the animation of value is 0 (invisible) to 1 (visible) I need to use OutCubic. Since I reverse the animation, I don't need to bother switching to InCubic though I should confirm that.

  • https://github.com/Zren/material-decoration/blob/master/src/Button.cc#L79-L86
  • https://invent.kde.org/plasma/breeze/-/commit/e5c6a3214d780cff22f524a0150be1c18ea978df
  • https://develop.kde.org/hig/style/animations/

Zren avatar Jan 15 '23 07:01 Zren

Apparently there's no fade out animations ATM since the current fg/bg color is based on the current hover/pressed state. I'll need to rethink my button animation code to support these transitions.

I've hacked together a ifPressed || wasPressed modification that works, but I think I'll look into a proper QPropertyAnimation on the colors (would need to be a grouped animation).

Zren avatar Jan 15 '23 22:01 Zren