Skip to content

Commit

Permalink
Added [.selected, .disabled] state
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 675596750
  • Loading branch information
Nobody authored and material-automation committed Sep 17, 2024
1 parent 2ee21c0 commit 444f8db
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions components/Chips/src/MDCChipView.m
Original file line number Diff line number Diff line change
Expand Up @@ -184,11 +184,13 @@ - (instancetype)initWithFrame:(CGRect)frame {
UIColor *normal = MDCColorFromRGB(MDCChipBackgroundColor);
UIColor *disabled = MDCColorLighten(normal, MDCChipDisabledLightenPercent);
UIColor *selected = MDCColorDarken(normal, MDCChipSelectedDarkenPercent);
UIColor *selectedDisabled = MDCColorFromRGB(MDCChipBackgroundColor);

_backgroundColors = [NSMutableDictionary dictionary];
_backgroundColors[@(UIControlStateNormal)] = normal;
_backgroundColors[@(UIControlStateDisabled)] = disabled;
_backgroundColors[@(UIControlStateSelected)] = selected;
_backgroundColors[@(UIControlStateSelected & UIControlStateDisabled)] = selectedDisabled;
}
_borderColors = [NSMutableDictionary dictionary];
_borderWidths = [NSMutableDictionary dictionary];
Expand Down

0 comments on commit 444f8db

Please sign in to comment.