-
Notifications
You must be signed in to change notification settings - Fork 146
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
Fix <Image> tintColor #408
Conversation
…iew." This reverts commit 5a67ae0.
Libraries/Image/RCTImageView.h
Outdated
@property (nonatomic, copy) RCTDirectEventBlock onDragEnter; | ||
@property (nonatomic, copy) RCTDirectEventBlock onDragLeave; | ||
@property (nonatomic, copy) RCTDirectEventBlock onDrop; | ||
@property (nonatomic, strong) RCTUIColor *tintColor; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is in a TARGET_OS_OSX block, just use NSColor directly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good idea.
Libraries/Image/RCTImageView.h
Outdated
@property (nonatomic, copy) RCTDirectEventBlock onDragEnter; | ||
@property (nonatomic, copy) RCTDirectEventBlock onDragLeave; | ||
@property (nonatomic, copy) RCTDirectEventBlock onDrop; | ||
@property (nonatomic, strong) RCTUIColor *tintColor; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we matching another property with strong? Or should we just be using copy since NSColor conforms to NSCopying
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was mimicking the tintColor
property of UIView
, but you're right, it should really be the same as the contentTintColor
of NSImageView
and other NSColor properties in AppKit. Also, RCTImageview doesn't need an ivar, it should just return the underlying NSImageView's contentTintColor.
Please select one of the following
Summary
The macOS version of
<Image>
never supported thetintColor
prop. Since macOS 10.14 there is now NSImageView tint support, so map the react-native prop.This fix is branched off the #407 fix, so i contains all the diffs from that PR as well. When the 407 PR completes, I'll merge it into this branch.
Fixes #315
Changelog
[macOS] [Fixed] - Fix
<Image>
tintColorTest Plan
Microsoft Reviewers: Open in CodeFlow