potocpav / python-concur

Concur UI Framework for Python
MIT License
48 stars 2 forks source link

[Suggestion] Add flag for retina screens to c.main() #28

Closed sla-te closed 3 years ago

sla-te commented 3 years ago

As per https://pyimgui.readthedocs.io/en/latest/guide/using-fonts.html#high-density-screens, we could add

win_w, win_h = glfw.get_window_size(window)
fb_w, fb_h = glfw.get_framebuffer_size(window)
font_scaling_factor = max(float(fb_w) / win_w, float(fb_h) / win_h)
imgui.get_io().font_global_scale /= font_scaling_factor

to c.main() at l. 121 which will be executed if retina in c.main() is True

sla-te commented 3 years ago

https://github.com/potocpav/python-concur/pull/31