22 Commits

Author SHA1 Message Date
Jeff Verkoeyen
92254ea119 Rename all icons to an ic_<#name#> convention.
PiperOrigin-RevId: 308232277
2020-04-24 04:33:51 -07:00
Jeff Verkoeyen
7bd2a4e317 Internal change
PiperOrigin-RevId: 307390564
2020-04-20 07:01:37 -07:00
featherless
2414525074
[Buttons] Replace MDCFlatButton with MDCButton + text themer in content edge insets example. (#3583)
Also fixes a bug where the button was being initialized as a system button instead of as a custom button. This was affecting the highlighted text state.

Pivotal story: https://www.pivotaltracker.com/story/show/157189341

Before (normal / highlighted):
![simulator screen shot - iphone se - 2018-04-30 at 09 21 34](https://user-images.githubusercontent.com/45670/39429179-18130c08-4c58-11e8-972a-b96dd827ee26.png) ![simulator screen shot - iphone se - 2018-04-30 at 09 21 36](https://user-images.githubusercontent.com/45670/39429181-193b0ff4-4c58-11e8-8dab-dcdfcf86a7cf.png)

After (normal / highlighted):
![simulator screen shot - iphone se - 2018-04-30 at 09 21 03](https://user-images.githubusercontent.com/45670/39429211-2e171710-4c58-11e8-95e6-07eb614857c8.png) ![simulator screen shot - iphone se - 2018-04-30 at 09 21 04](https://user-images.githubusercontent.com/45670/39429215-30bde2c8-4c58-11e8-882a-e585da609684.png)
2018-04-30 12:48:38 -04:00
featherless
d70da6a18d
[Buttons] Replace MDCRaisedButton with a contained button themer. (#3502)
Pivotal story: https://www.pivotaltracker.com/story/show/157107951

Before:
![simulator screen shot - iphone se - 2018-04-25 at 21 49 23](https://user-images.githubusercontent.com/45670/39281433-88dadd82-48d2-11e8-9661-418b66f1be0d.png)


After:
![simulator screen shot - iphone se - 2018-04-25 at 21 47 44](https://user-images.githubusercontent.com/45670/39281428-7d43bb24-48d2-11e8-8fb2-c1e8fa62eb31.png)
2018-04-26 12:50:33 -04:00
featherless
7c6248ccc0
[Buttons] Replace MDCRaisedButton with contained button APIs in content edge insets example. (#3453)
Pivotal story: https://www.pivotaltracker.com/story/show/157045336

Before:
![simulator screen shot - iphone se - 2018-04-24 at 07 30 07](https://user-images.githubusercontent.com/45670/39184503-995e4cda-4791-11e8-9ba7-6049c1a4d905.png)

After:
![simulator screen shot - iphone se - 2018-04-24 at 07 29 48](https://user-images.githubusercontent.com/45670/39184509-9bf4893c-4791-11e8-9fdf-a58c36fd90ce.png)
2018-04-24 08:53:01 -04:00
Robert Moore
2d8333d7d8 [Buttons] Extended FAB (#2563)
* [Buttons] Remove .largeIcon shape from FloatingButton (#2513)

The LargeIcon shape is not required, since the same behavior (support
for 36-point images) can be achieved by setting the contentEdgeInsets to
.zero.

Also updates one of the button examples to use a 36-point icon.

* [Buttons] Add extended FAB layout code (#2528)

Creating (internal for now) the required properties and layout code to support
the extended FAB. Unit tests to confirm the behavior and some minor
adjustments to existing values like default contentEdgeInsets values.

Implements #2495

* [Buttons] Expose Extended FAB properties (#2543)

Making the new properties public and also migrating away from simple
property setters to the new forShape:inMode: setters required for
UIAppearance support.

* minimumSize
* maximumSize
* contentEdgeInsets
* hitAreaInsets

Implements #2495

* [Buttons] Add basic Floating Button example (#2554)

Includes automatic adjustment of extended/normal layout depending on size
classes.

Demonstrates #2495

* [Buttons] Update README for Extended FAB (#2561)

The README includes usage examples for the FAB. Adding a section to
demonstrate how to configure the FAB in its different shapes and modes.

Documents #2495
2017-12-04 12:55:55 -05:00
Robert Moore
108aa31fb9 [Buttons] Fix example storyboard module (#2427)
The Storyboard example had the wrong module name (catalog) instead of
the "examples" module.

Closes #2425
2017-11-15 11:59:16 -05:00
Sam Morrison
057a430b4b [Buttons] Fix storyboard backgroundColor assignment (#1706)
* Update ButtonsStoryboardAndProgrammatic example with more distinct colors and comment explaining use

* Fix MDCButton for loading colors from storyboard without clobbering values
2017-07-27 13:10:37 -04:00
Robert Moore
cafcbe3544 [Buttons] Unbounded ink aligns to content insets (#1670)
* [Buttons] Unbounded ink aligns to content insets

Unbounded ink should be centered on the content of buttons, but bounded
ink should remain aligned with the bounds of the button.

* Changing Ink behavior for unbounded ink
* Modified Content Rect Insets example in the Catalog

Closes #1669

* Making example buttons have same width
2017-07-21 13:54:27 -04:00
Robert Moore
cc57a07918 [Buttons] Ink should ignore content edge insets (#1593)
The `contentEdgeInsets` value of an MDCButton causes the `_inkView` to
realign to match the `contentRect`.  This results in a ripple/highlight
that does not match the position of the button on-screen (doesn't align
with the background).

This commit removes the re-alignment code, so `_inkView` will remain
aligned with the rest of the button's view.
2017-06-30 15:01:40 -04:00
Alastair Tse
4a46c8c19e Monochromatic sweep of all catalog components (#1370)
* Replace MDC all icons

* Update border

* Replace MDCActionExtension icon with new logo

* Update all headers to be white on black

* Make Catalog greyscale to match Material’s style.

* Fix collection tile

* Update all headers to be white on black

* Make Catalog greyscale to match Material’s style.

* Fix collection tile

* WIP: Updating TabBar example to use black/green theme.

* WIP: Monochoroming all examples.

* Switch MDC Catalog to a black and white theme (#1355)

* Replace MDC all icons

* Update border

* Replace MDCActionExtension icon with new logo

* Update all headers to be white on black

* Make Catalog greyscale to match Material’s style.

* Fix collection tile

* Update all headers to be white on black

* Make Catalog greyscale to match Material’s style.

* Fix collection tile

* Fix floats

* Make Catalog greyscale to match Material’s style.

* More black and whiting

* WIP: Snackbar and global style

* Simplify snack bar examples.

* Page control
2017-05-05 16:16:47 -04:00
Adrian Secord
7ff646b58a [Swiftlint] Moar swiftlint fixes (#1155)
* Quieted swiftlint down in scripts/format_all.

* BONUS clang-format for ObjC code.

* Fixed two stray ObjC warnings (not swiftlint related).

* Fixed remaning swiftlint warnings.

* Fixed typos in Shrine fixes.

* Swift cleanups, again.

This reverts commit 7489fca4e4741ae02b406cdaacaf1dae26e19837.
2017-01-25 17:23:20 -05:00
Adrian Secord
7489fca4e4 Revert "Swift cleanups."
This reverts commit 129789c601a2bb6b09648af953c5433ebe3cebe0.
2017-01-25 16:58:40 -05:00
Adrian Secord
129789c601 Swift cleanups. 2017-01-25 16:56:24 -05:00
Adrian Secord
8bcb19781c More SwiftLint fixes for unit tests and example apps. (#1154)
* ClangFormat changes.

* Added swiftlint to scripts/format_all.`

* Fix scripts/lint_all to work from any directory.

* Fixed swiftlint invocation.

* Remove the checks for force casting (! operator).

* Some fixes.

* More Swift fixes.
2017-01-11 13:27:57 -05:00
Sam Symons
94a6d589e0 [Catalog] Center views in the Buttons (Swift and Storyboard) demo (#1126)
* Center the Storyboard button demo.

This uses an outer container to set up a view which is 50% the screen width (to allow for the other half of the button demo), and then an inner container to vertically and horizontally center the buttons.

* Center the buttons added programatically.
2017-01-04 17:46:45 -05:00
Junius Gunaratne
4596b7c861 [MDCFloatingButton] Floating action button should use a shape rather than text (#833)
* [MDCInkView] cancelAllAnimationsAnimated should support disabling animation

* [MDCProgressView] Allow completion block to be modified if setHidden:animated:completion is called sequentially

* Call completion block immediately rather than storing as a property.

* Add nil check for completion block

* [Shrine] Update to Swift 3

* [AppBar] Add Objective C AppBar storyboard example

* Add right button bar item to AppBar swift demo

* Add plus shape icon to FAB

* Move plus symbol to example code

* Add plus icon asset, move to supplemental

* Remove unused methods

* Undo change to print.

* Move plus CAShapeLayer code into its own method

* Remove plus path method

* Use supplemental method to get plus symbol CAShapeLayer
2016-11-16 13:31:59 -05:00
Ian Gordon
363a766c94 [Buttons] Update example
Summary:
Remove unnecessary sizing of storyboard buttons.
Fix spacing for programmatic buttons.
Change floating labell to match.

Reviewers: #mdc_ios_owners, ajsecord

Reviewed By: #mdc_ios_owners, ajsecord

Projects: #material_components_ios

Differential Revision: http://codereview.cc/D499
2016-04-07 10:48:06 -04:00
Junius Gunaratne
36ba8b0197 [Button demos] Add disabled button states to demos, change storyboard bg color
Reviewers: ajsecord, featherless, #mdc_ios_owners

Reviewed By: featherless, #mdc_ios_owners

Projects: #material_components_ios

Differential Revision: http://codereview.cc/D428
2016-03-31 09:24:43 -04:00
Ian Gordon
d04701e0c2 [Buttons] Fix uppercasing
Summary:
This is slightly hacky, as MDCButton should likely be an abstract
base class, but we can do that as it inherits from UIButton.

Reviewers: #mdc_ios_owners, randallli

Reviewed By: #mdc_ios_owners, randallli

Projects: #material_components_ios

Differential Revision: http://codereview.cc/D250
2016-03-11 14:40:33 -05:00
Ian Gordon
1508b6b1d6 [Buttons] Add Flatbutton commonInit
Summary:
We were not setting the backgroundColor to nil for FlatButtons
initialized from storyboards.  We do now.

Reviewers: #mdc_ios_owners, ajsecord

Reviewed By: #mdc_ios_owners, ajsecord

Projects: #material_components_ios

Differential Revision: http://codereview.cc/D247
2016-03-11 12:08:31 -05:00
Ian Gordon
d993a60532 [Buttons] Add storyboard sample
Reviewers: ajsecord, #mdc_ios_owners

Reviewed By: ajsecord, #mdc_ios_owners

Projects: #material_components_ios

Differential Revision: http://codereview.cc/D246
2016-03-10 17:39:31 -05:00