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 (main)

Author SHA1 Message Date
Tyler Goodlet e1a81fa433 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.
2026-01-12 22:53:00 -05:00
Tyler Goodlet 073f496f87 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?
2026-01-12 22:53:00 -05:00
Tyler Goodlet 5b08ee1317 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
2026-01-12 22:53:00 -05:00
Tyler Goodlet 28d0b4ce36 Re-fmt and `.info()` the `.configure_to_dpi()` DPI calcs for now 2026-01-12 22:53:00 -05:00
di1ara d4d4628680 fixed spacing 2026-01-12 22:53:00 -05:00
di1ara 78e5c799f0 fixed pytest test for dpi font auto calculation 2026-01-12 22:53:00 -05:00
di1ara ee45b46638 added pytest, moved dependencies 2026-01-12 22:53:00 -05:00
di1ara 4b6bd55df4 fix DpiAwareFont default size calculation 2026-01-12 22:52:55 -05:00
Gud Boi 9e82a46c0b Merge pull request 'how_to_show_ur_pp: fixes for end-2-end order/position display'
Reviewed-on: https://www.pikers.dev/pikers/piker/pulls/60
2026-01-07 19:32:55 +00:00