Skip to content

Commit

Permalink
Delete elevationOverlayColor: It is not used in any theming extensions.
Browse files Browse the repository at this point in the history
This property was added #7924

PiperOrigin-RevId: 351828292
  • Loading branch information
randallli authored and material-automation committed Jan 14, 2021
1 parent 4deaee1 commit 4195a48
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 27 deletions.
6 changes: 0 additions & 6 deletions components/schemes/Color/src/MDCSemanticColorScheme.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,6 @@
*/
@property(nonnull, readonly, copy, nonatomic) UIColor *onBackgroundColor;

/**
A color that is used for the elevation overlays, applied with an alpha on top of surfaces.
*/
@property(nonnull, readonly, copy, nonatomic) UIColor *elevationOverlayColor;

/**
A flag that indicates whether the overlay color should be applied on an elevated surface in Dark
Mode. There is no elevation overlay applied in Light Mode.
Expand Down Expand Up @@ -123,7 +118,6 @@ typedef NS_ENUM(NSInteger, MDCColorSchemeDefaults) {
@property(nonnull, readwrite, copy, nonatomic) UIColor *onSecondaryColor;
@property(nonnull, readwrite, copy, nonatomic) UIColor *onSurfaceColor;
@property(nonnull, readwrite, copy, nonatomic) UIColor *onBackgroundColor;
@property(nonnull, readwrite, copy, nonatomic) UIColor *elevationOverlayColor;
@property(readwrite, assign, nonatomic) BOOL elevationOverlayEnabledForDarkMode;

/**
Expand Down
5 changes: 0 additions & 5 deletions components/schemes/Color/src/MDCSemanticColorScheme.m
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ - (instancetype)initWithDefaults:(MDCColorSchemeDefaults)defaults {
_onSecondaryColor = ColorFromRGB(0x000000);
_onSurfaceColor = ColorFromRGB(0x000000);
_onBackgroundColor = ColorFromRGB(0x000000);
_elevationOverlayColor = ColorFromRGB(0x000000);
_elevationOverlayEnabledForDarkMode = NO;
break;
case MDCColorSchemeDefaultsMaterialDark201907:
Expand All @@ -68,7 +67,6 @@ - (instancetype)initWithDefaults:(MDCColorSchemeDefaults)defaults {
_onSecondaryColor = ColorFromRGB(0x000000);
_onSurfaceColor = ColorFromRGB(0xFFFFFF);
_onBackgroundColor = ColorFromRGB(0xFFFFFF);
_elevationOverlayColor = ColorFromRGB(0xFFFFFF);
_elevationOverlayEnabledForDarkMode = YES;
break;
case MDCColorSchemeDefaultsMaterial201907: {
Expand Down Expand Up @@ -123,9 +121,6 @@ - (instancetype)initWithDefaults:(MDCColorSchemeDefaults)defaults {
defaultColor:ColorFromRGB(0x000000)];
_onBackgroundColor = [UIColor colorWithUserInterfaceStyleDarkColor:ColorFromRGB(0xFFFFFF)
defaultColor:ColorFromRGB(0x000000)];
_elevationOverlayColor =
[UIColor colorWithUserInterfaceStyleDarkColor:ColorFromRGB(0xFFFFFF)
defaultColor:ColorFromRGB(0x000000)];
_elevationOverlayEnabledForDarkMode = YES;
break;
}
Expand Down
16 changes: 0 additions & 16 deletions components/schemes/Color/tests/unit/MDCSemanticColorSchemeTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ - (void)testInitMatchesInitWithMaterialDefaults {
XCTAssertEqualObjects(initScheme.onSecondaryColor, mdDefaultScheme.onSecondaryColor);
XCTAssertEqualObjects(initScheme.onSurfaceColor, mdDefaultScheme.onSurfaceColor);
XCTAssertEqualObjects(initScheme.onBackgroundColor, mdDefaultScheme.onBackgroundColor);
XCTAssertEqualObjects(initScheme.elevationOverlayColor, mdDefaultScheme.elevationOverlayColor);
XCTAssertEqual(initScheme.elevationOverlayEnabledForDarkMode,
mdDefaultScheme.elevationOverlayEnabledForDarkMode);
}
Expand All @@ -69,7 +68,6 @@ - (void)testInitWithMaterialDefaults {
XCTAssertEqualObjects(colorScheme.onSecondaryColor, ColorFromRGB(0x000000));
XCTAssertEqualObjects(colorScheme.onSurfaceColor, ColorFromRGB(0x000000));
XCTAssertEqualObjects(colorScheme.onBackgroundColor, ColorFromRGB(0x000000));
XCTAssertEqualObjects(colorScheme.elevationOverlayColor, ColorFromRGB(0x000000));
XCTAssertEqual(colorScheme.elevationOverlayEnabledForDarkMode, NO);
}

Expand All @@ -89,7 +87,6 @@ - (void)testInitWithMaterialDefaultsDark {
XCTAssertEqualObjects(colorScheme.onSecondaryColor, ColorFromRGB(0x000000));
XCTAssertEqualObjects(colorScheme.onSurfaceColor, ColorFromRGB(0xFFFFFF));
XCTAssertEqualObjects(colorScheme.onBackgroundColor, ColorFromRGB(0xFFFFFF));
XCTAssertEqualObjects(colorScheme.elevationOverlayColor, ColorFromRGB(0xFFFFFF));
XCTAssertEqual(colorScheme.elevationOverlayEnabledForDarkMode, YES);
}

Expand Down Expand Up @@ -134,9 +131,6 @@ - (void)testInitWithMaterialDefaults201907WhenUserInterfaceStyleIsDarkForiOS13 {
XCTAssertEqualObjects(
[colorScheme.onBackgroundColor resolvedColorWithTraitCollection:traitCollection],
ColorFromRGB(0xFFFFFF));
XCTAssertEqualObjects(
[colorScheme.elevationOverlayColor resolvedColorWithTraitCollection:traitCollection],
ColorFromRGB(0xFFFFFF));
XCTAssertEqual(colorScheme.elevationOverlayEnabledForDarkMode, YES);
}
#endif // MDC_AVAILABLE_SDK_IOS(13_0)
Expand Down Expand Up @@ -183,9 +177,6 @@ - (void)testInitWithMaterialDefaults201907WhenUserInterfaceStyleIsLightForiOS13
XCTAssertEqualObjects(
[colorScheme.onBackgroundColor resolvedColorWithTraitCollection:traitCollection],
ColorFromRGB(0x000000));
XCTAssertEqualObjects(
[colorScheme.elevationOverlayColor resolvedColorWithTraitCollection:traitCollection],
ColorFromRGB(0x000000));
XCTAssertEqual(colorScheme.elevationOverlayEnabledForDarkMode, YES);
}
#endif // MDC_AVAILABLE_SDK_IOS(13_0)
Expand All @@ -209,7 +200,6 @@ - (void)testInitWithMaterialDefaults201907WhenUserInterfaceStyleIsLightForPreiOS
XCTAssertEqualObjects(colorScheme.onSecondaryColor, ColorFromRGB(0x000000));
XCTAssertEqualObjects(colorScheme.onSurfaceColor, ColorFromRGB(0x000000));
XCTAssertEqualObjects(colorScheme.onBackgroundColor, ColorFromRGB(0x000000));
XCTAssertEqualObjects(colorScheme.elevationOverlayColor, ColorFromRGB(0x000000));
XCTAssertEqual(colorScheme.elevationOverlayEnabledForDarkMode, YES);
}
}
Expand Down Expand Up @@ -262,9 +252,6 @@ - (void)testInitWithMaterialDefaults201907WhenUserInterfaceStyleIsLightForPreiOS
XCTAssertEqualObjects(
[colorScheme.onBackgroundColor resolvedColorWithTraitCollection:traitCollection],
ColorFromRGB(0xFFFFFF));
XCTAssertEqualObjects(
[colorScheme.elevationOverlayColor resolvedColorWithTraitCollection:traitCollection],
ColorFromRGB(0xFFFFFF));
XCTAssertEqual(colorScheme.elevationOverlayEnabledForDarkMode, YES);
}
#endif // MDC_AVAILABLE_SDK_IOS(13_0)
Expand Down Expand Up @@ -318,9 +305,6 @@ - (void)testInitWithMaterialDefaults201907WhenUserInterfaceStyleIsLightForPreiOS
XCTAssertEqualObjects(
[colorScheme.onBackgroundColor resolvedColorWithTraitCollection:traitCollection],
ColorFromRGB(0x000000));
XCTAssertEqualObjects(
[colorScheme.elevationOverlayColor resolvedColorWithTraitCollection:traitCollection],
ColorFromRGB(0x000000));
XCTAssertEqual(colorScheme.elevationOverlayEnabledForDarkMode, YES);
}
#endif // MDC_AVAILABLE_SDK_IOS(13_0)
Expand Down

0 comments on commit 4195a48

Please sign in to comment.