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

[Fabric] Add switch's 'trackColor' #11234

Merged
merged 6 commits into from
Mar 28, 2023

Conversation

TatianaKapos
Copy link
Contributor

@TatianaKapos TatianaKapos commented Feb 16, 2023

Description

Adds 'track color' to Switch in Fabric

Type of Change

  • New feature (non-breaking change which adds functionality)

Why

Resolves #11212

Screenshots

image

Testing

Tested locally

Microsoft Reviewers: Open in CodeFlow

@acoates-ms acoates-ms added the Area: Fabric Support Facebook Fabric label Feb 16, 2023
@TatianaKapos TatianaKapos changed the title [DRAFT] Add switch 'trackColor' for fabric Add switch 'trackColor' for fabric Feb 21, 2023
@TatianaKapos TatianaKapos marked this pull request as ready for review February 21, 2023 18:11
@TatianaKapos TatianaKapos requested a review from a team as a code owner February 21, 2023 18:11
@TatianaKapos TatianaKapos changed the title Add switch 'trackColor' for fabric [Fabric] Add switch's 'trackColor' Feb 21, 2023
// switch track - outline
D2D1_ROUNDED_RECT track = D2D1::RoundedRect(trackRect, trackCornerRadius, trackCornerRadius);
if ((!switchProps->onTintColor && switchProps->value) || (!switchProps->tintColor && !switchProps->value)) {
d2dDeviceContext->DrawRoundedRectangle(track, defaultBrush.get());
Copy link
Contributor

Choose a reason for hiding this comment

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

Could simplify by make this the 'else' case below.

@jonthysell jonthysell mentioned this pull request Mar 23, 2023
157 tasks
@TatianaKapos TatianaKapos merged commit 8fc0f91 into microsoft:main Mar 28, 2023
@jonthysell jonthysell added the New Architecture Broad category for issues that apply to the RN "new" architecture of Turbo Modules + Fabric label Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Fabric Support Facebook Fabric Area: Switch New Architecture Broad category for issues that apply to the RN "new" architecture of Turbo Modules + Fabric
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Switch trackColor for Fabric
4 participants