11 Commits

Author SHA1 Message Date
Nobody
9e1c0c0a45 Internal change
PiperOrigin-RevId: 477458164
2022-09-28 08:26:32 -07:00
Alyssa Weiss
07075f8e7a Remove adjustsFontForContentSizeCategoryWhenScaledFontIsUnavailable property from MDCButton.
PiperOrigin-RevId: 377352366
2021-06-03 12:53:33 -07:00
Bill Griesau
9a8399a566 [Buttons] Fix bug where updating MDCButton's title case does not affect attributed titles.
PiperOrigin-RevId: 345738853
2020-12-04 12:59:45 -08:00
Bryan Oltman
da4b8f7c7f Fix mdc_elevationDidChangeBlock block parameter types for Xcode 12
PiperOrigin-RevId: 331843566
2020-09-15 13:39:15 -07:00
Cody Weaver
9039d47602 [MDC/Button] Add rippleColor and rippleStyle APIs
This commit adds the ripple color and ripple style APIs to match the inkColor and inkStyle APIs that are soon to be deprecated. This also moves those APIs to a "ToBeDeprecated" category. In this commit I set an ivar instead of having pass through properties because in a follow up I think it would be a good optimization to have the ripple be lazy until a user interacts with the button. This will lower initialization time and make the setters potentially faster. Since we don't have pass through properties I mirrored the default rippleColor from `MDCStatefulRippleView` to match here.

PiperOrigin-RevId: 322585578
2020-07-22 09:05:16 -07:00
Yarden Eitan
e8a1c4e7e1 [MDCButton] Add a visibleAreaInsets API.
This API allows clients to inset the visible content and allow it to be smaller than the frame.
In turn, clients can have a touch target that is bigger than the visible content.

PiperOrigin-RevId: 313556504
2020-05-28 03:17:34 -07:00
Bryan Oltman
f7f154d483 [Buttons] Move button alpha tests into their own file.
PiperOrigin-RevId: 308681214
2020-04-27 13:03:44 -07:00
Robert Moore
86ebced717
[Buttons] Add API to disable state-based fonts. (#8606)
Introduces a new API to disable the `titleFont:forState:` APIs. This is the
first step toward removing those APIs.

State-based fonts make it impossible to support UIContentSizeCategoryAdjusting
behavior on the button's `titleLabel`. Providing support for automatic font
resizing for Dynamic Type means removing state-based font APIs.

Part of #8595
2019-10-18 22:37:03 -04:00
Wenyu Zhang
e3784afe25
[Buttons] overwrite intrinsicContentSize method. (#8370)
The `instrinsicContentSize` of `MDCButton` was not aware of `minimumSize` property, which is wrong.
2019-08-27 13:20:54 -04:00
Yarden Eitan
f4352d73e6
[Buttons] Add missing self to traitCollectionDidChangeBlock (#8276)
As part of our work of adding traitCollectionDidChangeBlocks to components, we add self as a parameter to the block, buttons is the only component that seems to be missing it.

This is essentially a breaking change based on our breaking changes conventions.
2019-08-12 10:50:49 -04:00
Robert Moore
403c1b6a29
[Buttons] Support MaterialElevation. (#8073)
Adds protocol conformance for `MDCElevatable` and `MDCElevationOverriding`.

Closes #8023
2019-07-25 09:24:35 -04:00