dpi_scaling_round2: a bit of research on Qt6's hiDPI support #49

Open
goodboy wants to merge 4 commits from dpi_scaling_round2 into dpi-font-auto-calc

4 Commits (gitea_feats)

Author SHA1 Message Date
Tyler Goodlet e63cffaf53 Add `.xsh` script mentioned in gitea #50
Note since it's actually `xonsh` code run with either,
- most pedantically: `xonsh ./snippets/calc_ppi.xsh`
- or relying on how shebang: `./snippets/calc_ppi.xsh`
  * an sheboom.
2025-12-19 19:29:15 -05:00
Tyler Goodlet 49bedb4912 Reorder imports in `qt_screen_info.py` ??
For wtv reason on nixos importing `pyqtgraph` first is causing `numpy`
to fail import?? No idea, but likely something to do with recent
`flake.nix`'s ld-lib-linking with `<nixpkgs>` marlarky?
2025-12-18 18:24:19 -05:00
Tyler Goodlet 35744f666f Add some Qt DPI extras to `qt_screen_info.py`
- set `QT_USE_PHYSICAL_DPI='1'` env var for Qt6 high-DPI
  * we likely want to do this in `piker.ui` as well!
- move `pxr` calc from widget to per-screen in loop.
- add `unscaled_size` calc using `pxr * size`.
- switch from `.availableGeometry()` to `.geometry()` for full
  bounds.
- shorten output labels, add `!r` repr formatting
- add Qt6 DPI rounding policy TODO with doc links

(this patch was generated in some part by [`claude-code`][claude-code-gh])
[claude-code-gh]: https://github.com/anthropics/claude-code
2025-12-18 18:19:50 -05:00
Tyler Goodlet 6f9b7320e5 Re-fmt and `.info()` the `.configure_to_dpi()` DPI calcs for now 2025-12-18 18:19:50 -05:00