OrcaSlicer
OrcaSlicer copied to clipboard
Best effort for pixel perfect icon rendering
This currently requires the toolbar icon to have even size.
Fixes #4328
Before:
After:
Toolbar icons should be noticeably sharper.
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
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.
@yw4z Also I've noticed your comment about icon size using odd numbers https://github.com/SoftFever/OrcaSlicer/pull/4368#issuecomment-1986544994
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?
No i didnt changed their resolution to reduce code changes
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
@Noisyfox changing this line to int fixed issue for toolbar popup icons. they are pixel perfect now :)
https://github.com/SoftFever/OrcaSlicer/blob/f3b3e927824339bd76346bbb40b417de51aba31c/src/slic3r/GUI/IconManager.cpp#L376
included this to my UI commit
@Noisyfox changing this line to int fixed issue for toolbar popup icons. they are pixel perfect now :)
https://github.com/SoftFever/OrcaSlicer/blob/f3b3e927824339bd76346bbb40b417de51aba31c/src/slic3r/GUI/IconManager.cpp#L376
included this to my UI commit
Popups? Did you mean those gizmo panels?
yes also fixed blur on keyboard cheat sheet button
@SoftFever Since #4368 has been implemented, this PR should too. 😊 Otherwise the icons look somewhat blurry under Linux (Manjaro GNOME).
@Noisyfox @SoftFever here is my observations with code changes. i compiled with this changes
trying to make icons pixel perfect is unnecessary with scaling imo. i guess only necessary change is this line because icons already not supports lower resolutions
7673 const int offset = (cnv_width - toolbar_total_width) / 2;
other solutions for preventing scaling on icons
• Removing separators. this will reduce total with -40 px of toolbar commented lines these lines to remove separators
//if (!_init_separator_toolbar())
// return false;
Here is comparison with / without separators
• Reducing size of left spacing between sidebar toggle and toolbar
• Moving sidebar toggle to top bar. i guess this change will make a huge difference but requires more code changes
• Moving sidebar toggle to vertically center and exclude from toolbar calculations. Removing sidebar toggle from toolbar calculations saves additional 50px before triggering scaling. i added 2 lines for excluding and preventing rendering toggle button
after removing sidebar toggle, separators & left and right spacers. total width reduced by 110px. so scaling not starts before that
Preview of sidebar toggle with vertically centered (not included to code changes)
i didnt commited because tried completely different route. respect for your efforts some changes can be made with less code i tried to go with experimental way on my branch https://github.com/yw4z/OrcaSlicer/tree/toolbar-width-fix
Moving sidebar toggle to vertically center and exclude from toolbar calculations.
This does look better. One sidenote: make sure this won't overlap with the plate list on the preview view.
@yw4z @Noisyfox
What about moving the arrow to the top, but without protruding into the workspace?
Something like this:
Maybe the design could be adjusted according to the theme.
@yw4z @Noisyfox
What about moving the arrow to the top, but without protruding into the workspace? Something like this:
Maybe the design could be adjusted according to the theme.
That's not supported yet.
That's not supported yet.
That's a pity.
Maybe the design could be adjusted according to the theme.