Skip to content

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

Merged
mattleibow merged 2 commits into
mono:mainfrom
roubachof:main
Mar 15, 2023
Merged

[Uno] Default Opaque to false for SKXamlCanvas on MacOS and iOS#2398
mattleibow merged 2 commits into
mono:mainfrom
roubachof:main

Conversation

@roubachof

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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