After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 762260 - Check boxes and radio buttons animate when inside a popover that is opened
Check boxes and radio buttons animate when inside a popover that is opened
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Class: GtkStyleContext
3.19.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2016-02-18 12:01 UTC by Allan Day
Modified: 2016-07-27 21:01 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Allan Day 2016-02-18 12:01:53 UTC
It is now possible to animate check boxes and radio buttons with CSS - this is awesome. One slight problem with it, though: if there are check boxes or radios inside a popover, they animate into their set state while the popover reveals. This is rather distracting.

It would be better if the animation was only used when the user changes the state of the control.
Comment 1 Benjamin Otte (Company) 2016-02-19 03:44:38 UTC
This is because the theme is using an animation and not a transition. And animations get started once a widget gets shown.

I don't actually know why we're using not using transitions here?
Comment 2 Lapo Calamandrei 2016-02-19 08:13:24 UTC
Well a transition is just a cross-fade, too limited there.
Comment 3 Benjamin Otte (Company) 2016-02-23 21:29:59 UTC
You're just doing a cross-fade in the animation?
Comment 4 Lapo Calamandrei 2016-03-02 19:01:17 UTC
Benjamin, nope I'm doing all sort of nasty things as usual, anyway this issue seems gone here, Allan?
Comment 5 Matthias Clasen 2016-03-02 19:11:46 UTC
Whats nasty about this ?

@keyframes check_check {
  from { -gtk-icon-transform: translate(6px, -3px) rotate(-45deg) scaleY(0.2) rotate(45deg) scaleX(0); }
  to { -gtk-icon-transform: unset; }
}
Comment 6 Lapo Calamandrei 2016-03-02 21:06:31 UTC
Matthias, well it's quite a bit of stuff, legit but pretty complex.
The issue is not gone thought :-/
Comment 7 Lapo Calamandrei 2016-07-26 17:24:16 UTC
I tried working around the issue by setting the -gtk-icon-transform prop in the the normal state and unsetting it in the checked state, but it doesn't work for indeterminate check and radios and it's a hack anyway. Moving to gtkstylecontext since this issue can't be tackled within the theme.
Comment 8 Matthias Clasen 2016-07-27 16:18:46 UTC
I think comment #1 has all you need to know: use an animation, not a transition. The transition works according to spec...
Comment 9 Lapo Calamandrei 2016-07-27 21:01:35 UTC
uhm, animation triggers on show, not on state changes so I can't use those, I think I found a way using transitions though, the downside is that thre's a longer (normal) transition when brought back from backdrop, but I think it's a minor offence wrt animating on show. 
Fix pushed with commit 15b2dbf9a8e6de17fb74eef989ed5923ef6c6180 closing.