Skip to content

Fix ButtonItem hover event#2473

Merged
j9ac9k merged 1 commit intopyqtgraph:masterfrom
bbc131:origin/fix_button_item
Oct 7, 2022
Merged

Fix ButtonItem hover event#2473
j9ac9k merged 1 commit intopyqtgraph:masterfrom
bbc131:origin/fix_button_item

Conversation

@bbc131
Copy link
Copy Markdown
Contributor

@bbc131 bbc131 commented Oct 7, 2022

  • Fix method name mouseHoverEvent -> hoverEvent. Therefore, it has never been called.
  • Fix changing opacity while hovering. Change it back to "non-hover-state" only after hover event with "is-exit" occurs. (Note, that hoverEvent is called multiple times while mouse cursor is on the item.)

Simply have a look at the "Auto-Range-Button" in any plot to see the hovering work now.

* Fix method name `mouseHoverEvent` -> `hoverEvent`.
  Therefore, it has never been called.
* Fix changing opacity while hovering.
  Change it back to "non-hover-state" only after hover event with
  "is-exit" occurs. (Note, that `hoverEvent` is called multiple times
  while mouse cursor is on the item.)
@j9ac9k
Copy link
Copy Markdown
Member

j9ac9k commented Oct 7, 2022

Fixes #2123

@j9ac9k
Copy link
Copy Markdown
Member

j9ac9k commented Oct 7, 2022

Thanks for the PR @bbc131 and thanks for the report @hatawong This LGTM, merging.

@j9ac9k j9ac9k merged commit a58fd67 into pyqtgraph:master Oct 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants