Skip to content

Conversation

@tspiller
Copy link
Collaborator

@tspiller tspiller commented Nov 20, 2024

Description

In GUIHelpers.LoadIcon() pixelsPerPoint is being cast from float to int in order to calculate scale. Using a simple cast truncates the floating point number resulting in the scale being rounded to 1 for any value from 1-1.99 and the default 1x icon being used. Any scale above 1.0 should ideally be using 2x icon and the icons will appear more clearly in Input Actions if the integer value is rounded up be default.

Testing status & QA

Local testing

Overall Product Risks

Value rounding for a value already clamped

  • Complexity: 0
  • Halo Effect: 0

Comments to reviewers

Checklist

Before review:

  • Changelog entry added.
    • Explains the change in Changed, Fixed, Added sections.
    • For API change contains an example snippet and/or migration example.
    • JIRA ticket linked, example (case %%). If it is a private issue, just add the case ID without a link.
    • Jira port for the next release set as "Resolved".
  • Tests added/changed, if applicable.
    • Functional tests Area_CanDoX, Area_CanDoX_EvenIfYIsTheCase, Area_WhenIDoX_AndYHappens_ThisIsTheResult.
    • Performance tests.
    • Integration tests.
  • Docs for new/changed API's.
    • Xmldoc cross references are set correctly.
    • Added explanation how the API works.
    • Usage code examples added.
    • The manual is updated, if needed.

During merge:

  • Commit message for squash-merge is prefixed with one of the list:
    • NEW: ___.
    • FIX: ___.
    • DOCS: ___.
    • CHANGE: ___.
    • RELEASE: 1.1.0-preview.3.

After merge:

  • Create forward/backward port if needed. If you are blocked from creating a forward port now please add a task to ISX-1444.

@tspiller tspiller requested review from Pauliusd01 and ekcoh November 20, 2024 14:47
@tspiller tspiller marked this pull request as ready for review November 20, 2024 14:48
Copy link
Collaborator

@Pauliusd01 Pauliusd01 left a comment

Choose a reason for hiding this comment

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

Checked 1080p, 1440p and 1440p ultrawide with 100%, 125% and 200% scaling. Icons were correct

Copy link
Collaborator

@ekcoh ekcoh left a comment

Choose a reason for hiding this comment

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

Good find, LGTM

@tspiller tspiller merged commit 7f8d00f into develop Nov 22, 2024
77 checks passed
@tspiller tspiller deleted the isxb-1213-correct-icon-scale-rounding branch November 22, 2024 11:28
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