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

Best effort for pixel perfect icon rendering #4552

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

Noisyfox
Copy link
Collaborator

@Noisyfox Noisyfox commented Mar 18, 2024

This currently requires the toolbar icon to have even size.

Fixes #4328

Before:
icon_before

After:
icon_after

Toolbar icons should be noticeably sharper.

@yw4z
Copy link
Contributor

yw4z commented Mar 18, 2024

thanks for your efforts on this, i will report results
This problem also appears on popup windows of toolbar. especially on these places

  • Emboss > alignment icons
  • Emboss > buttons near Style dropdown menu
  • Other > Keyboard cheat sheet button
    i guess emboss popup aligns to right of window and bottom of window. icons looks blurry vertically and horizontally

@Noisyfox
Copy link
Collaborator Author

thanks for your efforts on this, i will report results This problem also appears on popup windows of toolbar. especially on these places

  • Emboss > alignment icons
  • Emboss > buttons near Style dropdown menu
  • Other > Keyboard cheat sheet button
    i guess emboss popup aligns to right of window and bottom of window. icons looks blurry vertically and horizontally

Not sure if I could do anything about these.

@Noisyfox
Copy link
Collaborator Author

@yw4z Also I've noticed your comment about icon size using odd numbers #4368 (comment)

Technically you're right but some of the existing code make the assumption that icon sizes are in even numbers and I'm not sure how well it might behave.

If you are planing to use icons with odd numbers, could you try using the binary of this PR and replace with your icons and see if they work well?

@yw4z
Copy link
Contributor

yw4z commented Mar 19, 2024

No i didnt changed their resolution to reduce code changes
Screenshot-20240319054512
mostly they have blank 1px line 2 sides
I'm adding all required changes in that commit as a to-do list. still changing things but big part of work is done

@yw4z
Copy link
Contributor

yw4z commented Mar 23, 2024

@Noisyfox changing this line to int fixed issue for toolbar popup icons. they are pixel perfect now :)

float offset_y = (line_height - s.y) / 2;

included this to my UI commit

@Noisyfox
Copy link
Collaborator Author

@Noisyfox changing this line to int fixed issue for toolbar popup icons. they are pixel perfect now :)

float offset_y = (line_height - s.y) / 2;

included this to my UI commit

Popups? Did you mean those gizmo panels?

@yw4z
Copy link
Contributor

yw4z commented Mar 23, 2024

yes also fixed blur on keyboard cheat sheet button

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.

Toolbar icons blurry
2 participants