dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.04k stars 1.73k forks source link

[MAC/iOS] Contents are blurred with scaling #9420

Open Deepak1799 opened 2 years ago

Deepak1799 commented 2 years ago

Description

When I try to scale a content (View) using the "Scale" property, the contents are appeared blurred with scaling in MAC and iOS. This blur issue occurs in all of the views.

Please refer to the screenshot of the text in a label after 4x scaling.

image

Note: In Android and WIndows, the contents are not blurred with scaling Please find the expected result of the same in the Windows platform in the below screenshot.

image

Steps to Reproduce

  1. Run the attached sample. MauiApp26.zip
  2. Click the Button "Scale 2x". It will scale the content with the factor 2. View.Scale*=2;
  3. Check the quality of the text content.

Version with bug

6.0.486 (current)

Last version that worked well

Unknown/Other

Affected platforms

iOS, macOS

Affected platform versions

iOS 15

Did you find any workaround?

No

Relevant log output

NA
jfversluis commented 2 years ago

Thanks for the report @Deepak1799 however I am wondering: isn't this just how macOS and iOS handle scaling? Do you have any experience with Obj-C/Swift where this does work better? Or let me say it differently: do you have any evidence that this is specific to .NET MAUI?

If so, please add some more detail around that and also please add the reproduction project as a GitHub repository and link that here. Thanks!

ghost commented 2 years ago

Hi @Deepak1799. We have added the "s/needs-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

Deepak1799 commented 2 years ago

Hi @jfversluis ,

Thank you for the reply. From my knowledge on iOS UIViews, there is property called ContentsScale, which needs to be updated on scaling to over provide lossless scaling in iOS as in Windows/Android. https://developer.apple.com/documentation/quartzcore/calayer/1410746-contentsscale

C# equivalent: https://docs.microsoft.com/en-us/dotnet/api/coreanimation.calayer.contentsscale?view=xamarin-ios-sdk-12

Could you please check whether this property is handled in your scaling (or) try setting it?

Regards, Deepak G

ghost commented 1 year ago

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

ghost commented 1 year ago

Hi @Deepak1799. We have added the "s/try-latest-version" label to this issue, which indicates that we'd like you to try and reproduce this issue on the latest available public version. This can happen because we think that this issue was fixed in a version that has just been released, or the information provided by you indicates that you might be working with an older version.

You can install the latest version by installing the latest Visual Studio (Preview) with the .NET MAUI workload installed. If the issue still persists, please let us know with any additional details and ideally a reproduction project provided through a GitHub repository.

This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

homeyf commented 1 year ago

Verified this issue with VSM 17.6 Preview 7(17.6.0.1526). Can repro on iOS and macOS platforms with above project. repro project: MauiApp26.zip image