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

[Uno] Default Opaque to false for SKXamlCanvas on MacOS and iOS #2398

Merged
merged 2 commits into from
Mar 15, 2023
Merged

[Uno] Default Opaque to false for SKXamlCanvas on MacOS and iOS #2398

merged 2 commits into from
Mar 15, 2023

Conversation

roubachof
Copy link
Contributor

Description of Change

See canvas default opacity to none on mac and iOS to align on other platforms.

Bugs Fixed

API Changes

None.

Behavioral Changes

By default, canvas will be transparent instead of black.

Required skia PR

None.

PR Checklist

  • Has tests (if omitted, state reason in description)
  • Rebased on top of main at time of PR
  • Merged related skia PRs
  • Changes adhere to coding standard
  • Updated documentation

@mattleibow mattleibow merged commit a2cfbb2 into mono:main Mar 15, 2023
Comment on lines +23 to +25
#if MACOS
Opaque = false;
#endif
Copy link
Contributor

Choose a reason for hiding this comment

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

This is actually incorrect for macOS. There is no Opaque property, but rather IsOpaque. However, this other property is read only and according to the docs you should override the property to return the value you want:

The default value of this property is false to reflect the fact that views do no drawing by default. Subclasses can override this property and return true to indicate that the view completely covers its frame rectangle with opaque content. Doing so can improve performance during drawing operations by eliminating the need to render content behind the view.
https://developer.apple.com/documentation/appkit/nsview/1483558-isopaque

Copy link
Contributor

Choose a reason for hiding this comment

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

Fixed in #2477

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oops sorry about that ! I thought I tested it :/

mattleibow added a commit that referenced this pull request Jun 7, 2023
#2398 had an issue but was merged in the hopes CI would work.
I am now working on CI and this is blocking.
Fix for a2cfbb2
mattleibow added a commit that referenced this pull request Jun 7, 2023
#2398 had an issue but was merged in the hopes CI would work.
I am now working on CI and this is blocking.
Fix for a2cfbb2
@mattleibow mattleibow added this to the v2.88.4 milestone Jun 19, 2023
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.

3 participants