Closed ebisu4 closed 1 year ago
@ebisu4 thanks for starting this!
We've been needing someone to help bring up support on the windows front and getting (hidpi) related text and graphics sizing correct would sure be a good start 😂
I'm going to try this on linux and report back; i'm not sure i can comment on why a certain font wouldn't get used on windows.
Maybe there's something we can web search up to do with Qt that's a known hot tip?
@sirdinkus since afaik you would still be on windows, would you mind testing this out?
Ok on linux first try i get this:
(venv) >>> piker -l info chart --pdb btcusdt.binance
Traceback (most recent call last):
File "/home/lord_fomo/repos/piker/venv/bin/piker", line 33, in <module>
sys.exit(load_entry_point('piker', 'console_scripts', 'piker')())
File "/home/lord_fomo/repos/piker/venv/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/home/lord_fomo/repos/piker/venv/lib/python3.10/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/home/lord_fomo/repos/piker/venv/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/lord_fomo/repos/piker/venv/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/lord_fomo/repos/piker/venv/lib/python3.10/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/home/lord_fomo/repos/piker/venv/lib/python3.10/site-packages/click/decorators.py", line 38, in new_func
return f(get_current_context().obj, *args, **kwargs)
File "/home/lord_fomo/repos/piker/piker/ui/cli.py", line 176, in chart
_main(
File "/home/lord_fomo/repos/piker/piker/ui/_app.py", line 184, in _main
run_qtractor(
File "/home/lord_fomo/repos/piker/piker/ui/_exec.py", line 167, in run_qtractor
_style._config_fonts_to_screen()
File "/home/lord_fomo/repos/piker/piker/ui/_style.py", line 214, in _config_fonts_to_screen
_font.configure_to_dpi()
File "/home/lord_fomo/repos/piker/piker/ui/_style.py", line 119, in configure_to_dpi
self._set_qfont_px_size(self._font_size)
File "/home/lord_fomo/repos/piker/piker/ui/_style.py", line 81, in _set_qfont_px_size
self._qfont.setPixelSize(px_size)
TypeError: setPixelSize(self, a0: int): argument 1 has unexpected type 'str'
@ebisu4 made a PR to fix your branch:
I would add a section in the example config file
@iamzoltan i did in my sub-PR if you see https://github.com/ebisu4/piker/pull/1
Not sure why this got closed @ebisu4 but with my merged changed to your fork we should be able to get this tested quick by other devs 😎
While font size changes, there's an issue with setting the font name. Help would be appreciated.
Example: Append the following to conf.toml located in one of the directories labeled accordingly Non-Tinas: $HOME/.config/piker/conf.toml Tinas: %AppData%\piker\conf.toml
Append: