-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
exportersIssue relating to exportersIssue relating to exportersgood first issuehacktoberfestIssue relating to hacktoberfestIssue relating to hacktoberfest
Description
Depending on the size of the scene the export dialog box can be drawn off or partially off screen. This is due to an implementation of the show command that allows moving the box to negative pixel indices.
Problem Code:
pyqtgraph/pyqtgraph/GraphicsScene/exportDialog.py
Lines 57 to 62 in a5f48ec
| if not self.shown: | |
| self.shown = True | |
| vcenter = self.scene.getViewWidget().geometry().center() | |
| self.setGeometry(int(vcenter.x() - self.width() / 2), | |
| int(vcenter.y() - self.height() / 2), | |
| self.width(), self.height()) |
To fix this, the position calculation can be clipped using max, and the setGeometry command can be changed to move to account for the size of the window's frame.
Potential Fix:
if not self.shown:
self.shown = True
vcenter = self.scene.getViewWidget().geometry().center()
x = max(0, int(vcenter.x() - self.width() / 2))
y = max(0, int(vcenter.y() - self.height() / 2))
self.move(x, y)I can't say I understand the motivation for moving the dialog box in the first place, but atleast with this modification the dialog box is always accessible with the mouse.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
exportersIssue relating to exportersIssue relating to exportersgood first issuehacktoberfestIssue relating to hacktoberfestIssue relating to hacktoberfest