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

fix gizmo bar wobbling #6230

Merged
merged 4 commits into from
Aug 4, 2024
Merged

Conversation

buzzhuzz
Copy link
Contributor

Description

Gizmo bar is wobbling at specific application window width range. This comes from a bar scaling calculations method:
- new scale calculated for already scaled bar
- scale stored as application settings loosing precision

Rework gizmo bar resizing code to remove feedback:
- calculate scale factor based on unscaled bar size

Screenshots/Recordings/Graphs

Screen recording demonstrating the problem

orca-gizmo-bar-report.mp4

Tests

Manual tests with different window sizes

Gizmo bar is wobbling at specific application window width range.
This comes from a bar scaling calculations method:
    - new scale calculated for already scaled bar
    - scale stored as application settings loosing precision

Rework gizmo bar resizing code to remove feedback:
    - calculate scale factor based on unscaled bar size
@yw4z
Copy link
Contributor

yw4z commented Jul 23, 2024

i saw many linux users complain about this on discord and reddit. maybe more testers needed
also can you check icons are still pixel perfect on regular toolbar size on different window widths
related commit with this #4552

@igiannakas
Copy link
Contributor

I've had a similar issue on MacOS. Will test this, thank you for the effort in fixing it!!!

@igiannakas
Copy link
Contributor

It works but on Mac OS it makes the bar too small:

image

@buzzhuzz
Copy link
Contributor Author

@igiannakas , thanks for your testing

@yw4z, thanks for your comment. Looking at your changes I see that windows builds are still broken.

I'll update PR once fix MacOS and Windows builds.

Unify scaling implementation across platforms (MacOS, Win, Linux).

Now all platform scale bar setting icon size.
Toolbar scale is used for high-DPI displays scaling only.
@buzzhuzz
Copy link
Contributor Author

Upon code studying I found that #4552 only affects windows build. After that I've installed windows test VM, download Orca release bulid and found that gizmo bar icons are slightly smaller and much sharper:

  • Current Linux implementation:
    Screenshot from 2024-07-24 16-30-06
  • Updated Linux implemenattion (windows-like):
    Screenshot from 2024-07-24 16-29-23

Gizmo bar scaling code now unified across all platforms and shall produce exact result across all three.

@igiannakas
Copy link
Contributor

Tested on MacOS - think its working well!

collapse_toolbar.set_scale(sc / 2.0);
size *= m_retina_helper->get_scale_factor();

/* Soolbar scale is a constant value which depends on display resolution and OS. */
Copy link
Owner

Choose a reason for hiding this comment

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

Could you add a prefex Orca: for the comments?
So that it's will make my future work of merging upstreams easier

@buzzhuzz
Copy link
Contributor Author

buzzhuzz commented Aug 3, 2024

Added commentary. Slightly reorganized code to minimize diff output.

Copy link
Owner

@SoftFever SoftFever left a comment

Choose a reason for hiding this comment

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

Looks good
Thank you

@SoftFever SoftFever merged commit 9ff0e93 into SoftFever:main Aug 4, 2024
15 of 16 checks passed
@buzzhuzz buzzhuzz deleted the dbuzz/gizmo-bar-resize branch August 4, 2024 03:06
SoftFever added a commit that referenced this pull request Aug 4, 2024
@SoftFever
Copy link
Owner

Hi @buzzhuzz

A heads up, both user and I found the flicking is worse after this change.
I have reverted the change for now.
I have also committed a workaround fix(cbda70a), it seems working fine now.

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.

4 participants