Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CheckBox and CheckButton ignores hover style when checked ON (pressed) #19429

Closed
akien-mga opened this issue Jun 7, 2018 · 1 comment · Fixed by #22384
Closed

CheckBox and CheckButton ignores hover style when checked ON (pressed) #19429

akien-mga opened this issue Jun 7, 2018 · 1 comment · Fixed by #22384
Milestone

Comments

@akien-mga
Copy link
Member

Godot version:
3.0.2 and master (3d5aabe)

OS/device including version:
All.

Issue description:
When a CheckBox or CheckButton is checked ON, no custom style is applied.

This was mentioned initially in #8640 by @hickop and @ProbDenis, and I can confirm it:
screenshot_20180607_221637

From my tests (see attached project below), the issue seems to be that the "pressed" style has precedence on the "hover" style, so when the box/button is ticked ON (pressed), only the pressed style is applied.

I'm not sure if this should be fixed by making the "hover" style have precedence on the "pressed" style (just like it has precedence on the "normal"/unpressed style), or if there should be another "pressed + hover" style. I guess the former might be fine, but were some using this as a feature?

Steps to reproduce:

  • Add a CheckBox or CheckButton, set custom_styles properties
  • Tick the CheckBox/CheckButton ON, see that hovering does not override the "pressed" style (or the "focus" style if you still have focus after pressing).

Minimal reproduction project:
checkbox_pressed_hover.zip

@ArthaTi
Copy link

ArthaTi commented Sep 22, 2018

In a normal button pressed has precedence over hover because they are always mixed - if it's pressed then you sure are hovering/focusing it. Checkboxes have a little different logic - a checkbox CAN be pressed and not hovered at once. So, pressed+hover would probably be the most reasonable here, assuming it will be added to checkbox and checkbutton, not to button, IMO. Also, separating hover to hover and focus like in Styles would be nice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants