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

MAYA-111084 - LE save icon missing when scaling is 125% #1408

Merged

Conversation

seando-adsk
Copy link
Collaborator

MAYA-111084 - LE save icon missing when scaling is 125%

  • We don't provide icons at 125% so make sure to account for that.

* We don't provide icons at 125% so make sure to account
  for that.
@seando-adsk seando-adsk added the bug Something isn't working label May 11, 2021
Comment on lines +57 to +66
#ifdef Q_OS_DARWIN
return baseName + "_100.png";
#else
const auto scale = utils->dpiScale();
if (scale >= 2.0)
return baseName + "_200.png";
else if (scale >= 1.5)
return baseName + "_150.png";
return baseName + "_100.png";
#endif
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

When running at custom scaling 125%, the base name would become "_125.png" - but we do not provide at 125% icon file. So reworked the code to make sure we always return either _100/_150/_100 - which are the three sizes we support.

Comment on lines +82 to +83
background-position: center center;
background-repeat: no-repeat;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

At 125 the icon used is _100 so there was extra space and the icon was centered and actually repeated. So this centers it (vert/horz) and turns off repeat. I checked all supported scaling factors (100/125/150/200).

Copy link
Contributor

@spinell-adsk spinell-adsk left a comment

Choose a reason for hiding this comment

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

look good to me.

@seando-adsk seando-adsk added the ready-for-merge Development process is finished, PR is ready for merge label May 13, 2021
@kxl-adsk kxl-adsk merged commit ac2fb6a into dev May 14, 2021
@kxl-adsk kxl-adsk deleted the donnels/MAYA-111084/layer_editor_icon_missing_at_scaling_125 branch June 15, 2021 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ready-for-merge Development process is finished, PR is ready for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants