fix DpiAwareFont default size calculation #48

Open
momo wants to merge 9 commits from dpi-font-auto-calc into how_to_show_ur_pp

9 Commits (gitea_feats)

Author SHA1 Message Date
momo 6ee0d86548 Merge pull request 'dpi_scaling_round2: a bit of research on `Qt6`'s hiDPI support' (#49) from dpi_scaling_round2 into dpi-font-auto-calc
Reviewed-on: #49
2025-12-22 21:47:57 +00:00
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
di1ara 47dbed1229 fixed spacing 2025-12-08 22:22:31 -05:00
di1ara 0563c91b33 fixed pytest test for dpi font auto calculation 2025-12-08 22:16:59 -05:00
di1ara 7ff4f5d059 added pytest, moved dependencies 2025-12-08 15:29:56 -05:00
di1ara c6c768eb77 fix DpiAwareFont default size calculation 2025-12-03 16:50:10 -05:00