Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hip shot: try making low dpi "just work" #157

Merged
merged 6 commits into from
Apr 1, 2021
Merged

Hip shot: try making low dpi "just work" #157

merged 6 commits into from
Apr 1, 2021

Conversation

goodboy
Copy link
Contributor

@goodboy goodboy commented Mar 29, 2021

There's a bunch more to do with this but figured I'd get it up so peeps can test.

So far most core devs and advanced users are working on hi dpi displays so HD has been mostly an afterthought.

This is a first draft/attempt at trying to make things "just work" when the auto-hidpi scaling doesn't seem to activate in minimal desktop linux envs (eg. i3 with no compositor).

This first bit of commits hacks font sizes depending on if a physical DPI of <= 97 is detected; in which case a smaller set of default font sizes are used.

TODO:

  • scale a variety of annotation graphics for low dpi
  • scale pixel offsets for labels and axes based on some kind of font proportion?
  • potentially get some users to test with full linux desktop envs (like gnome3) to see if the built-in hi-dpi detection stuff from Qt works out of the box deferring to be part of DPI aware dynamic UI rescaling #159

@guilledk
Copy link
Contributor

Can confirm looks good on my machine
pic

@goodboy
Copy link
Contributor Author

goodboy commented Mar 31, 2021

@guilledk give that latest tip a shot.

Pretty sure everything is resolved now 🏄🏼

@goodboy goodboy marked this pull request as ready for review March 31, 2021 18:31
llabel.orient_v = orient_v
llabel.render()
llabel.show()
# # left side label
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah not convinced at all on these line labels minus the simple one for sizing. i'm thinkin we might want to swap out the contents labels with position and order info when order mode is engaged.

margins = margins[0], ydim(font_size)
margins = margins[0], ydim(anchor_font_size)

print(f'margins: {margins}')
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

drop this print

Copy link
Contributor

@iamzoltan iamzoltan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. I like the idea of dpi aware fonts. Next up scaling the windows?

@goodboy
Copy link
Contributor Author

goodboy commented Apr 1, 2021

@iamzoltan pretty much everything in the UI/UX should just scale around information.

If you've used any decent software on mult-display gaming rigs you'll see that most good native apps just figure all this out for you and show a consistent "size in real world units" on screen - I think this is the way we should go from the outset.

@goodboy goodboy merged commit 4a590ed into master Apr 1, 2021
@iamzoltan
Copy link
Contributor

yea, that sounds like the most sane approach

@goodboy goodboy deleted the lo_dpi branch April 6, 2021 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants