Skip to content

Commit

Permalink
Expose defaultContentEdgeInsets readonly property on MDCButton in r…
Browse files Browse the repository at this point in the history
…egular header for the class, rather than only in the subclassing header, as clients may need to reset content insets back to their defaults after using a themer, even if they do not subclass MDCButton.

PiperOrigin-RevId: 316165414
  • Loading branch information
jakerockland authored and material-automation committed Jun 12, 2020
1 parent 765676c commit df66587
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 5 additions & 0 deletions components/Buttons/src/MDCButton.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@
*/
@property(nonatomic, assign) UIEdgeInsets visibleAreaInsets;

/**
The default content edge insets of the button. They are set at initialization time.
*/
@property(nonatomic, readonly) UIEdgeInsets defaultContentEdgeInsets;

/**
The offset (in points) of the button's inkView or rippleView (depending on which is being used -
see @c enableRippleBehavior)
Expand Down
3 changes: 0 additions & 3 deletions components/Buttons/src/private/MDCButton+Subclassing.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,4 @@
/** The bounding path of the button. The shadow will follow that path. */
- (nonnull UIBezierPath *)boundingPath;

/** The default content edge insets of the button. They are set at initialization time. */
- (UIEdgeInsets)defaultContentEdgeInsets;

@end

0 comments on commit df66587

Please sign in to comment.