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 733967 - provide proper pseudostates for radios and checkboxes
provide proper pseudostates for radios and checkboxes
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Class: GtkStyleContext
3.13.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks: 734290
 
 
Reported: 2014-07-30 10:35 UTC by Jakub Steiner
Modified: 2014-08-27 19:28 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jakub Steiner 2014-07-30 10:35:55 UTC
We currently use :active for the CSS :checked state of checkboxes and radios and confusingly have :selected for CSS :active. We run into issues when a checkbox is meant to be in a treeview row, which is selected.

We need to be consistent with the pseudo selectors to be able to keep the same style and behavior.
Comment 1 Benjamin Otte (Company) 2014-08-14 03:32:47 UTC
Pushed a wip/checked branch that does this and a bunch of related cleanups.

Adwaita still is kinda unhappy in menus and treeviews because ".check:checked:backdrop" overrides ".menuitem.check" (higher specificity), but I guess the checkmenuitem CSS needs a ":checked" and a bunch of work anyway.

The code now uses (or tries to use, assuming it's not buggy) these pseudoclasses for checkboxes, radioboxes, togglebuttons, togglecelltenderers and checkmenuitems (I hope I did not forget a widget):
  :checked
The widget is checked, or in GTK speak, its "active" property is set.
  :inconsistent
The widget is inconsistent, or in GTK speak, its "inconsistent" property is set.
  :active
The widget is active (CDE called this armed). The user has pressed but not yet released the mouse button or key that activates the widget.
  :hover
As always: The mouse is on top of the widget.

There is no more :selected state.
Comment 2 Jakub Steiner 2014-08-18 08:56:03 UTC
I see this has landed. I've fixed the remaining parts. Thanks a lot, Benjamin!
Comment 3 Benjamin Otte (Company) 2014-08-27 19:28:54 UTC
Pushed a commit to GTK master to also use :checked instead of :active for
expanders. The affected widgets are GtkExpander, GtkTreeView and
GtkToolpalette.