Skip to content

Conversation

@zenseii
Copy link
Collaborator

@zenseii zenseii commented Sep 5, 2023

Relates to and final part of #6105

This has been implemented:

  1. Variable width for the SKIP and AUTO buttons according to their texts.
  2. Variable width of the Status Bar according to the widths of the buttons.

For the Cyrillic font it looks quite good even though the buttons are slightly wider than the originals which means we have 15 pixels less for text:

image

Meanwhile, for the Latin font it is obvious that we have to cram the letters closer together. I found the sweet spot to be 2 pixels closer in the x-direction.

This is what it looks like for the Latin font without cramming:

image

Implementing a feature to cram letters would need a new function for calculating text width because it needs to take into account that the letters are rendered on top of each other, and we need a new function for actually rendering the text with letters on top of each other.

This change would give us 12 pixels more in width in the case when we have two words of 4 letters (ex. AUTO + SKIP), ( 2 pixels * ( 2 words * ( 4 letters - 1 first letter ) ) ). We would then only lose 3 pixels for text.

Such big changes might be better to do in a separate PR.

This change could be used to solve button problems like those described here #7548

This is what the SKIP button would look like with 2 pixels closer for letters.
image

Related to #9261

@zenseii zenseii added improvement New feature, request or improvement ui UI/GUI related stuff translation Things related to languages and translations labels Sep 5, 2023
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

⚠️ clang-tidy found issue(s) with the introduced code (1/1)

@zenseii zenseii added this to the 1.0.8 milestone Sep 5, 2023
@zenseii zenseii modified the milestones: 1.0.8, 1.0.9 Sep 6, 2023
@ihhub ihhub modified the milestones: 1.0.9, 1.1.0 Oct 11, 2023
@ihhub ihhub modified the milestones: 1.1.1, 1.1.2 Jul 13, 2024
@ihhub ihhub modified the milestones: 1.1.2, 1.1.3 Sep 15, 2024
@ihhub ihhub modified the milestones: 1.1.3, 1.1.4 Oct 23, 2024
@ihhub ihhub modified the milestones: 1.1.4, 1.1.5 Nov 27, 2024
@ihhub ihhub modified the milestones: 1.1.5, 1.1.6 Dec 30, 2024
@ihhub ihhub modified the milestones: 1.1.6, 1.1.7 Feb 16, 2025
@ihhub
Copy link
Owner

ihhub commented Mar 21, 2025

Hi @zenseii , can you please explain what is missing to be implemented in this pull request? Can we help to move forward with the changes or the idea?

@zenseii
Copy link
Collaborator Author

zenseii commented Mar 21, 2025

@ihhub. There are 2 things necessary for this implementation to be ready:

  1. Implement a text method that makes the letter images move 1px closer to each other if the text exceeds a specified width. This width should be passed as an argument and not be a fixed value. Ex. if a max text width is specified as 86 (:standard button text width), then a text width that is wider will have its letters placed 1 px closer to each other.
    It should also be taken into consideration that if a text consists of several lines, then only the lines which exceed this width should have letters moved closer, e.g. Multiplayer\nGame where only Multiplayer should be made smaller by 1 px.
  2. Tidying and improvement of the PR's code.

Help with the first step would be appreciated and should be made in a different PR.

@ihhub ihhub modified the milestones: 1.1.7, 1.1.8 Mar 23, 2025
@ihhub ihhub modified the milestones: 1.1.8, 1.1.9 May 3, 2025
@ihhub ihhub modified the milestones: 1.1.9, 1.1.10 Jun 11, 2025
@ihhub ihhub modified the milestones: 1.1.10, 1.2.0 Jul 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement New feature, request or improvement translation Things related to languages and translations ui UI/GUI related stuff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants