GTK3: Checkboxes do not indicate hover or pressed states

RESOLVED FIXED in Firefox 41

Status

()

Core
Widget: Gtk
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: acomminos, Assigned: acomminos)

Tracking

unspecified
mozilla41
Points:
---

Firefox Tracking Flags

(firefox41 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

3 years ago
Using GTK 3.14, checkboxes in forms do not show any visual indication that they are being pressed or hovered over.

See gtk3-widget-factory for correct behaviour.
Blocks: 627699
The proper state flags to use would be GTK_STATE_FLAG_PRELIGHT for hover and GTK_STATE_FLAG_ACTIVE for being pressed.

As noted in bug 1073117, check boxes had no active state before 3.14, where ACTIVE means checked. Since 3.14, check boxes can be active, and the checked state has been moved to CHECKED.
(Assignee)

Comment 2

3 years ago
Created attachment 8611472 [details] [diff] [review]
Use widget state in GTK3 toggles' style context.

This works as an unintrusive solution, but it might be worth moving the widget state setup to nsNativeThemeGTK instead.

Any thoughts would be appreciated; thanks!
Attachment #8611472 - Flags: review?(karlt)
Comment on attachment 8611472 [details] [diff] [review]
Use widget state in GTK3 toggles' style context.

This looks good to me, thanks.

(In reply to Andrew Comminos [:acomminos] from comment #2)
> but it might be worth moving the
> widget state setup to nsNativeThemeGTK instead.

I'm not sure.  If it means lots of special cases in nsNativeThemeGTK it wouldn't be a win.

> Any thoughts would be appreciated; thanks!

I wonder why we have both GtkWidgetState::depressed and the selected parameter.  I don't know what distinction there is between those, if any.
Attachment #8611472 - Flags: review?(karlt) → review+
(Assignee)

Comment 4

3 years ago
Try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=266985552c95

(In reply to Karl Tomlinson (ni?:karlt) from comment #3)
> I wonder why we have both GtkWidgetState::depressed and the selected
> parameter.  I don't know what distinction there is between those, if any.

They're inconsistent at the moment, but GtkWidgetState::depressed appears to be intended to describe activated toggle-able widgets. Currently the selected state is fetched from a 'flags' argument set in nsNativeThemeGTK::GetGtkWidgetAndState instead.
(Assignee)

Updated

3 years ago
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/73103204e24e
Status: NEW → RESOLVED
Last Resolved: 3 years ago
status-firefox41: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
You need to log in before you can comment on or make changes to this bug.