Skip to content

set SymbolAtlas dpr to primary screen's dpr#2965

Merged
j9ac9k merged 1 commit intopyqtgraph:masterfrom
pijyoi:probe-dpr
Mar 16, 2024
Merged

set SymbolAtlas dpr to primary screen's dpr#2965
j9ac9k merged 1 commit intopyqtgraph:masterfrom
pijyoi:probe-dpr

Conversation

@pijyoi
Copy link
Copy Markdown
Contributor

@pijyoi pijyoi commented Mar 16, 2024

Set the startup DPR of ScatterPlotItem's SymbolAtlas to the primary screen's DPR, so that users with hidpi screens are not penalized by a guaranteed SymbolAtlas rebuild.

https://doc.qt.io/qt-6/qguiapplication.html#primaryScreen-prop says that:
This will be the screen where QWindows are initially shown, unless otherwise specified.

Fixes #2960
Test script can be found in the comments of the linked issue.

Remarks:

  1. ScatterPlotItem can (surprisingly) be instantiated without a QGuiApplication, in which case there will be no primary screen.

@j9ac9k
Copy link
Copy Markdown
Member

j9ac9k commented Mar 16, 2024

walrus operator strikes again!

Thanks for the PR @pijyoi LGTM 👍🏻

@j9ac9k j9ac9k merged commit f63774f into pyqtgraph:master Mar 16, 2024
@pijyoi pijyoi deleted the probe-dpr branch March 16, 2024 11:41
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.

PyQtGraph 0.1.14 takes approximately twice as long to plot colored points in a ScatterPlotItem that 0.1.13

2 participants