Skip to content
This repository has been archived by the owner on Jul 10, 2018. It is now read-only.

Hi-DPI / scaling support in all components #2

Closed
kirill-grouchnikov opened this issue Jan 30, 2017 · 7 comments
Closed

Hi-DPI / scaling support in all components #2

kirill-grouchnikov opened this issue Jan 30, 2017 · 7 comments

Comments

@kirill-grouchnikov
Copy link
Owner

There's a whole bunch of issues in a lot of Flamingo components when the runtime font sizes are large. This is just one such example of relying on hard-coded sizes for preferred width and / or height.

While it's worth considering providing this support for all core look-and-feels, if that proves to be too much work, such support will only be provided in the Substance Flamingo plugin.

From a very cursory look, there's a bunch of hard-coded values for

  1. Preferred icon sizes in all command button layout managers (ribbon, breadcrumb bar, command menus)
  2. Button width for the gallery scroller
  3. Color squares in the color selector popup
  4. Buttons in ribbon task pane

In addition:

  1. Ribbon task pane in collapsed state is represented by a button that is too wide
  2. Rich tooltips can go beyond screen bounds
@plingsi
Copy link

plingsi commented Apr 6, 2017

Hi, any updates om this issue?

@kirill-grouchnikov
Copy link
Owner Author

So far the closest I can get to this setup is to explicitly bump up the default font size used by Substance, but I don't think that it's a correct recreation of it.

Would it be possible to create a small sample on your machine that creates a JFrame with a single JButton on it - under one of Substance's look and feels. Then, print out the following values:

SubstanceSizeUtils.getControlFontSize
SubstanceSizeUtils.getComponentFontSize(yourButton)

I think that under that 200% DPI setting the second value should be exactly twice that of the first one. If that's indeed so, then it'll give me a place to start from to scale the icons on command buttons.

@kirill-grouchnikov
Copy link
Owner Author

Playing with the system preference for display resolution on my Mac doesn't show any issues. I think it's scaling the entire UI after it's been drawn by the app, so everything scales up and down.

@plingsi
Copy link

plingsi commented Apr 18, 2017 via email

kirill-grouchnikov added a commit that referenced this issue Apr 19, 2017
Scale icons in command buttons
Scale some of the visuals in ribbon
@kirill-grouchnikov
Copy link
Owner Author

The just uploaded 5.2-dev drop of Flamingo and 7.1-dev drops of Substance and Substance Flamingo should be the first major step towards high-DPI awareness of Flamingo components.

This is not fully done, as there are some hard-coded pixel values around. Will take a few more iterations, but in general this is ready for preliminary testing.

@plingsi
Copy link

plingsi commented Apr 20, 2017 via email

kirill-grouchnikov added a commit that referenced this issue Aug 10, 2017
* High-DPI support for ribbon galleries and collapsed ribbon bands
tracked in #2
* Correct visuals for rollover animation on flat command buttons
tracked in #6
kirill-grouchnikov added a commit to kirill-grouchnikov/substance-flamingo that referenced this issue Aug 10, 2017
* High-DPI support for ribbon galleries and collapsed ribbon bands
tracked in kirill-grouchnikov/flamingo#2
* Correct visuals for rollover animation on flat command buttons
tracked in kirill-grouchnikov/flamingo#6
@kirill-grouchnikov
Copy link
Owner Author

Closing as of the latest drops of Flamingo and Substance Flamingo plugin. If you see anything not respecting high DPI mode, please file as separate issue(s).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants