From df6658771a83f2e8d3637f7ff0549437fb9c1d5f Mon Sep 17 00:00:00 2001 From: Jake Rockland Date: Fri, 12 Jun 2020 13:22:29 -0700 Subject: [PATCH] Expose `defaultContentEdgeInsets` readonly property on MDCButton in regular 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 --- components/Buttons/src/MDCButton.h | 5 +++++ components/Buttons/src/private/MDCButton+Subclassing.h | 3 --- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/components/Buttons/src/MDCButton.h b/components/Buttons/src/MDCButton.h index 8d6490d07b5..13b6741ae76 100644 --- a/components/Buttons/src/MDCButton.h +++ b/components/Buttons/src/MDCButton.h @@ -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) diff --git a/components/Buttons/src/private/MDCButton+Subclassing.h b/components/Buttons/src/private/MDCButton+Subclassing.h index 7bfbfe600b8..c96af5e6230 100644 --- a/components/Buttons/src/private/MDCButton+Subclassing.h +++ b/components/Buttons/src/private/MDCButton+Subclassing.h @@ -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