Skip to content

fix(iOSmacOS): Obsolete the use of readonly fields - #9126

Merged
jeromelaban merged 2 commits into
unoplatform:masterfrom
spouliot:gh9027
Jun 26, 2022
Merged

jeromelaban merged 2 commits into
unoplatform:masterfrom
spouliot:gh9027

Conversation

@spouliot

Copy link
Copy Markdown
Contributor

GitHub Issue (If applicable): closes #9027

PR Type

What kind of change does this PR introduce?

  • Bugfix

What is the current behavior?

ViewHelper has C# readonly fields for MainScreenScale and IsRetinaDisplay that are evaluated only once. IOW they are set to the current screen when the evaluation is done and moving the window to a different screen will not update the values.

What is the new behavior?

Both readonly fields are now decorated with [Obsolete] attributes giving update instructions to directly use (now cached) DisplayInformation properties. This ensure the current (screen) values will be given for every call during the app lifetime.

PR Checklist

Please check if your PR fulfills the following requirements:

Other information

Internal Issue (If applicable):

@spouliot
spouliot requested a review from a team June 24, 2022 14:40
@gitpod-io

gitpod-io Bot commented Jun 24, 2022

Copy link
Copy Markdown

@jeromelaban jeromelaban left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice ! Let's validate the screenshot comparison results as well.

@jeromelaban

Copy link
Copy Markdown
Member

Screenshots look good!

@jeromelaban
jeromelaban merged commit 048db03 into unoplatform:master Jun 26, 2022
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.

[macos][ios] Issues with ViewHelper

2 participants