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

Use cached icons in Component Browser #5779

Merged
merged 8 commits into from
Mar 2, 2023

Conversation

farmaazon
Copy link
Contributor

@farmaazon farmaazon commented Feb 28, 2023

Pull Request Description

Closes #5189

The component browser uses cached icons, both on the cached list and the navigator panel. It reduced the number of draw calls by 18.

Important Notes

Checklist

Please include the following checklist in your PR:

  • The documentation has been updated if necessary.
  • All code conforms to the
    Scala,
    Java,
    and
    Rust
    style guides.
  • All code has been tested:
    • Unit tests have been written where possible.
    • If GUI codebase was changed: Enso GUI was tested when built using BOTH
      ./run ide build and ./run ide watch.

@sylwiabr sylwiabr requested a review from kazcw February 28, 2023 18:39
@vitvakatu
Copy link
Contributor

QA report

Issues

The icons of the component browser look visibly worse than before.

Before: (current develop)
Screenshot 2023-03-01 at 17 43 51

After:
Screenshot 2023-03-01 at 17 51 33

Note the blurred "A" and "5" in text input/number input icons, and also a thinner circle in local scope icon.

Icons demo scene:

Before:

Screenshot 2023-03-01 at 16 50 30

After:

Screenshot 2023-03-01 at 17 54 12

Screenshot 2023-03-01 at 17 54 23

Note the two icons on the right and how the plus shape in the center looks different even when the dimensions are the same. These icons are not pixel-aligned, though.

Other issues

Reported #5786, this is probably not caused by this PR.

@farmaazon
Copy link
Contributor Author

@vitvakatu Fixes apply, please check them out.

@vitvakatu
Copy link
Contributor

Looks much better, though I still see a subtle difference
Develop:
Screenshot 2023-03-01 at 17 43 51

Latest commit:
Screenshot 2023-03-01 at 20 15 44

(I judge by the letter "A" in the text input icon.

Though the difference is relatively minimal, we can accept it.

@mergify mergify bot merged commit 0575c8d into develop Mar 2, 2023
@mergify mergify bot deleted the wip/farmaazon/cached-cb-icons-5189 branch March 2, 2023 14:51
mwu-tow pushed a commit that referenced this pull request Mar 10, 2023
Fixes #5807 

When implementing [cached icons in the Component Browser](#5779), I assumed pixel_ratio may be only integral (1.0 on normal machines and 2.0 on Retina), but I forgot Windows by default scales its UI by 1.25, breaking the icons entirely.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: Ready to merge This PR is eligible for automatic merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make Component Browser Icons Cached Shapes
5 participants