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

UI scale breaks start menu #5062

Closed
Robyt3 opened this issue May 1, 2022 · 8 comments · Fixed by #5393
Closed

UI scale breaks start menu #5062

Robyt3 opened this issue May 1, 2022 · 8 comments · Fixed by #5393
Labels
client Related to the client-side.

Comments

@Robyt3
Copy link
Member

Robyt3 commented May 1, 2022

With UI scale below 100:

  • the aspect ratio of the images is incorrect
  • buttons move further down
  • size of buttons increases

With UI scale above 100:

  • text overlaps images
  • buttons move further up
  • size of buttons decreases

I'm don't think it's a good idea to apply the UI scale in every V/HSplit. This requires a bunch of fixes like / UI()->Scale() to split elements scale independent again.

Relevant TODO:

class CUIRect
{
// TODO: Refactor: Redo UI scaling
float Scale() const;

Screenshots:
  • ui_scale 50:
    scale-50
  • ui_scale 70:
    scale-70
  • ui_scale 100:
    scale-100
  • ui_scale 110:
    scale-110
  • ui_scale 120:
    scale-120
  • ui_scale 150:
    scale-150
@def-
Copy link
Member

def- commented May 1, 2022

Does it work elsewhere? Maybe we should just remove ui_scale, I'm not sure if it's used much.

@Robyt3
Copy link
Member Author

Robyt3 commented May 1, 2022

Values in the range 90-110 mostly seem to work. With other values there are various major/minor issues. Especially the settings are not useable with scale > 110.

@Chairn
Copy link
Contributor

Chairn commented May 1, 2022

Visually impaired people might use it, but i believe they rely more on OS tools for this.

@def-
Copy link
Member

def- commented May 1, 2022

Visually impaired people will have a lot of trouble playing DDNet I think. And OS tools can't interact with our UI at all to get texts out.

@Robyt3
Copy link
Member Author

Robyt3 commented May 10, 2022

@kaitlynia
Copy link
Contributor

The idea to remove ui_scale is a threat to user accessibility. There are many things we could do in order to rework ui_scale:

  • Set constraints on how much a given component can shrink/grow
  • Make sure lists/grids like the skins list account for ui_scale when the dimensions are calculated, instead of clipping the container
  • Implement some positioning system that works more like a web browser, pushing content that won't fit on the current row to the next line and scrolling if the height overflows the container

@heinrich5991
Copy link
Member

The idea to remove ui_scale is a threat to user accessibility. There are many things we could do in order to rework ui_scale:

Is there anyone using ui_scale? If yes, we should talk to them. If not, the removal seems fine.

@def-
Copy link
Member

def- commented May 13, 2022

It's been broken/untested for many years, so I doubt it has many users.

@Chairn Chairn added client Related to the client-side. todo labels May 25, 2022
@bors bors bot closed this as completed in 5a7fa10 Jun 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client Related to the client-side.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants