| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| Expand Up | @@ -299,7 +299,8 @@ def get_width_height(self): | |
| return int(w / self._dpi_ratio), int(h / self._dpi_ratio) | ||
|
|
||
| def enterEvent(self, event): | ||
| FigureCanvasBase.enter_notify_event(self, guiEvent=event) | ||
| x, y = self.mouseEventCoords(event.pos()) | ||
| FigureCanvasBase.enter_notify_event(self, guiEvent=event, xy=(x, y)) | ||
|
Comment thread
Copy link
Copy Markdown
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityThis can just be self.enter_notif_event(guiEvent=event, xy=(x, y))
Sorry, something went wrong.
All reactions
Copy link
Copy Markdown
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityCould do but that would break some inconsistency with the other event as well. For example def wheelEvent(self, event):
x, y = self.mouseEventCoords(event)
# from QWheelEvent::delta doc
if event.pixelDelta().x() == 0 and event.pixelDelta().y() == 0:
steps = event.angleDelta().y() / 120
else:
steps = event.pixelDelta().y()
if steps:
FigureCanvasBase.scroll_event(self, x, y, steps, guiEvent=event)
def keyPressEvent(self, event):
key = self._get_key(event)
if key is not None:
FigureCanvasBase.key_press_event(self, key, guiEvent=event)
def keyReleaseEvent(self, event):
key = self._get_key(event)
if key is not None:
FigureCanvasBase.key_release_event(self, key, guiEvent=event)
Sorry, something went wrong.
All reactions
Copy link
Copy Markdown
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityFair. I suppose those could also all be changed to normal method calls, but that is beyond the scope of this PR.
Sorry, something went wrong.
All reactions
|
||
|
|
||
| def leaveEvent(self, event): | ||
| QtWidgets.QApplication.restoreOverrideCursor() | ||
| Expand Down | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| Expand Up | @@ -1053,7 +1053,10 @@ def _onLeave(self, evt): | |
|
|
||
| def _onEnter(self, evt): | ||
| """Mouse has entered the window.""" | ||
| FigureCanvasBase.enter_notify_event(self, guiEvent=evt) | ||
| x = evt.GetX() | ||
| y = self.figure.bbox.height - evt.GetY() | ||
| evt.Skip() | ||
| FigureCanvasBase.enter_notify_event(self, guiEvent=evt, xy=(x, y)) | ||
|
Comment thread
Copy link
Copy Markdown
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityThis can also just be self.enter_notify_event.
Sorry, something went wrong.
All reactions
|
||
|
|
||
|
|
||
| class FigureCanvasWx(_FigureCanvasWxBase): | ||
| Expand Down | ||
| Back | FazBrowse Home | New Git URL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityCan you add a warning here like
?
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Qualitycbook.warn_deprecated?
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.