Set default Cupertino primaryContrastingColor to white#153039
Merged
auto-submit[bot] merged 1 commit intoflutter:masterfrom Aug 7, 2024
Merged
Conversation
Fixes flutter#152846 In accordance with iOS HIG
a3cd896 to
c288594
Compare
MitchellGoodwin
approved these changes
Aug 7, 2024
Contributor
MitchellGoodwin
left a comment
There was a problem hiding this comment.
LGTM! Thank you for putting this together. This will need a secondary reviewer, so let me see if I can get somebody.
QuncCccccc
approved these changes
Aug 7, 2024
Contributor
QuncCccccc
left a comment
There was a problem hiding this comment.
LGTM! Thanks for the fix:)
Contributor
Author
|
Happy to help! 🤗 ✨ |
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Aug 8, 2024
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Aug 8, 2024
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Aug 8, 2024
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Aug 8, 2024
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Aug 8, 2024
auto-submit bot
pushed a commit
to flutter/packages
that referenced
this pull request
Aug 8, 2024
Manual roll requested by [email protected] flutter/flutter@d595e98...b6cd31e 2024-08-08 [email protected] Add a contribution doc on using reliable links in tooling (flutter/flutter#150962) 2024-08-08 [email protected] Roll Flutter Engine from 94cf8c8fad31 to 3978ddd8d7a7 (1 revision) (flutter/flutter#153086) 2024-08-08 [email protected] Roll Flutter Engine from 9dd4a2303898 to 94cf8c8fad31 (2 revisions) (flutter/flutter#153073) 2024-08-08 [email protected] Roll Flutter Engine from 9932f34aac4e to 9dd4a2303898 (1 revision) (flutter/flutter#153067) 2024-08-08 [email protected] Add drawer and navigation drawer in a11y assessment app, also run `dart format` under a11y_assessments/ (flutter/flutter#153034) 2024-08-07 [email protected] Roll Flutter Engine from d4d9537bccdf to 9932f34aac4e (1 revision) (flutter/flutter#153063) 2024-08-07 [email protected] Clean up MenuAnchor (flutter/flutter#152946) 2024-08-07 [email protected] Set default Cupertino `primaryContrastingColor` to white (flutter/flutter#153039) 2024-08-07 [email protected] Roll Flutter Engine from 317eb6107646 to d4d9537bccdf (2 revisions) (flutter/flutter#153058) 2024-08-07 [email protected] Allow dropdown_menu to accept any EdgeInsetsGeometry (flutter/flutter#153053) 2024-08-07 [email protected] Add xcresulttool --legacy flag for deprecated usage (flutter/flutter#152988) 2024-08-07 [email protected] Revert "Marks Mac channels_integration_test to be flaky" (flutter/flutter#153044) 2024-08-07 [email protected] Roll Flutter Engine from 69c29fb309bb to 317eb6107646 (2 revisions) (flutter/flutter#153048) 2024-08-07 [email protected] Marks Linux android_java17_dependency_smoke_tests to be unflaky (flutter/flutter#153011) 2024-08-07 [email protected] Marks Linux android_java11_dependency_smoke_tests to be unflaky (flutter/flutter#153010) 2024-08-07 [email protected] [web] hide the --web-renderer option in the tool (flutter/flutter#152683) 2024-08-07 [email protected] Doc imports again (flutter/flutter#152958) 2024-08-07 [email protected] Roll Flutter Engine from 5a0fd5fbecc6 to 69c29fb309bb (6 revisions) (flutter/flutter#153035) 2024-08-07 [email protected] Roll Packages from 551bde5 to 5cc0a01 (12 revisions) (flutter/flutter#153040) 2024-08-07 [email protected] MenuAnchor hover traversal fixes (flutter/flutter#150914) 2024-08-07 [email protected] Style: Rename CupertinoSwitch activeColor and trackColor to activeTrackColor and InactiveTrackColor (flutter/flutter#151367) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
9 tasks
auto-submit bot
pushed a commit
that referenced
this pull request
Aug 12, 2024
This PR fixes #92525 and introduces the following changes according to [latest iOS HIG](https://developer.apple.com/design/human-interface-guidelines/buttons#iOS-iPadOS): - `CupertinoButton` now has a `size` property (type `enum CupertinoButtonSize`, values sm/md/lg, default `lg`) that allows the devs to apply new iOS 15+ button styles - Previously `CupertinoButton` had a larger padding when no background color was specified. With the new HIG, that is no longer the case - `CupertinoButton` now has a `.tinted` constructor that renders a translucent background (transparency % is brightness-dependent) and uses a different foreground color compared to `.filled` - `CupertinoButton` now uses the `actionTextStyle` TextStyle from the given theme - `CupertinoButton`'s child IconTheme's size will always be x1.2 the given TextStyle's size - `CupertinoTextThemeData` now has a `actionSmallTextStyle` property to use with small buttons (including a default `_kDefaultActionSmallTextStyle` TextStyle) Preview & example:  > **NOTE**: there is a discrepancy in dark mode button foreground color between the default CupertinoTheme and the HIG. A separate issue will be opened for this. ~EDIT: issue reported here #152846 EDIT2: fixed by #153039 !  ## Example ```dart import 'package:flutter/cupertino.dart'; const Widget body = Row( mainAxisSize: MainAxisSize.min, mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[ Icon( CupertinoIcons.play_fill, ), Text("Play"), ], ); void main() => runApp( CupertinoApp( home: Container( child: Wrap( direction: Axis.horizontal, children: <Widget>[ // header Text(''), Text('Plain'), Text('Grey'), Text('Tinted'), Text('Filled'), // small Text('Small'), CupertinoButton( child: body, onPressed: () {}, size: CupertinoButtonSize.small, ), CupertinoButton.tinted( child: body, onPressed: () {}, size: CupertinoButtonSize.small, color: CupertinoColors.systemGrey, ), CupertinoButton.tinted( child: body, onPressed: () {}, size: CupertinoButtonSize.small, ), CupertinoButton.filled( child: body, onPressed: () {}, size: CupertinoButtonSize.small, ), // medium Text('Medium'), CupertinoButton( child: body, onPressed: () {}, size: CupertinoButtonSize.medium, ), CupertinoButton.tinted( child: body, onPressed: () {}, size: CupertinoButtonSize.medium, color: CupertinoColors.systemGrey, ), CupertinoButton.tinted( child: body, onPressed: () {}, size: CupertinoButtonSize.medium, ), CupertinoButton.filled( child: body, onPressed: () {}, size: CupertinoButtonSize.medium, ), // large Text('Large'), CupertinoButton( child: body, onPressed: () {}, size: CupertinoButtonSize.large, ), CupertinoButton.tinted( child: body, onPressed: () {}, color: CupertinoColors.systemGrey, size: CupertinoButtonSize.large, ), CupertinoButton.tinted( child: body, onPressed: () {}, size: CupertinoButtonSize.large, ), CupertinoButton.filled( child: body, onPressed: () {}, size: CupertinoButtonSize.large, ), ].map((Widget w) => SizedBox(width: 110, height: 70, child: Center(child: w))).toList(), ), ) ), ); ``` *List which issues are fixed by this PR. You must list at least one issue. An issue is not required if the PR fixes something trivial like a typo.* *If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*
DBowen33
pushed a commit
to DBowen33/flutter
that referenced
this pull request
Aug 16, 2024
) **Fixes flutter#152846 in accordance with iOS HIG** Previously the `_CupertinoThemeDefaults _kDefaultTheme` would set the `primaryContrastingColor` to `CupertinoColors.systemBackground`, which was white-ish in light mode, and black-ish in dark mode. That was in accordance with Apple Design Resources from 5 years ago. > Before: > <img width="594" alt="image" src="proxy.php?url=https://github.com/user-attachments/assets/63e88abb-6933-446f-a7ba-55109d0f353c"> As of now, iOS HIG suggests that the `primaryContrastingColor` (in combination with the currently default `primaryColor: CupertinoColors.systemBlue`) be white (regardless of light/dark modes, contrast, elevation, etc.) > After: > <img width="594" alt="image" src="proxy.php?url=https://github.com/user-attachments/assets/2a48f22b-a886-46dd-aada-6d157cb4ac06"> Example code: ```dart import 'package:flutter/cupertino.dart'; import 'package:flutter/widgets.dart'; void main() => runApp( CupertinoApp( theme: CupertinoThemeData( brightness: Brightness.dark, ), home: Center(child: CupertinoButton.filled( onPressed: () {}, child: Row( mainAxisSize: MainAxisSize.min, children: <Widget>[ Icon(CupertinoIcons.add), Text('Add'), ], ), ) ) ) ); ```
DBowen33
pushed a commit
to DBowen33/flutter
that referenced
this pull request
Aug 16, 2024
…lutter#152845) This PR fixes flutter#92525 and introduces the following changes according to [latest iOS HIG](https://developer.apple.com/design/human-interface-guidelines/buttons#iOS-iPadOS): - `CupertinoButton` now has a `size` property (type `enum CupertinoButtonSize`, values sm/md/lg, default `lg`) that allows the devs to apply new iOS 15+ button styles - Previously `CupertinoButton` had a larger padding when no background color was specified. With the new HIG, that is no longer the case - `CupertinoButton` now has a `.tinted` constructor that renders a translucent background (transparency % is brightness-dependent) and uses a different foreground color compared to `.filled` - `CupertinoButton` now uses the `actionTextStyle` TextStyle from the given theme - `CupertinoButton`'s child IconTheme's size will always be x1.2 the given TextStyle's size - `CupertinoTextThemeData` now has a `actionSmallTextStyle` property to use with small buttons (including a default `_kDefaultActionSmallTextStyle` TextStyle) Preview & example:  > **NOTE**: there is a discrepancy in dark mode button foreground color between the default CupertinoTheme and the HIG. A separate issue will be opened for this. ~EDIT: issue reported here flutter#152846 EDIT2: fixed by flutter#153039 !  ## Example ```dart import 'package:flutter/cupertino.dart'; const Widget body = Row( mainAxisSize: MainAxisSize.min, mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[ Icon( CupertinoIcons.play_fill, ), Text("Play"), ], ); void main() => runApp( CupertinoApp( home: Container( child: Wrap( direction: Axis.horizontal, children: <Widget>[ // header Text(''), Text('Plain'), Text('Grey'), Text('Tinted'), Text('Filled'), // small Text('Small'), CupertinoButton( child: body, onPressed: () {}, size: CupertinoButtonSize.small, ), CupertinoButton.tinted( child: body, onPressed: () {}, size: CupertinoButtonSize.small, color: CupertinoColors.systemGrey, ), CupertinoButton.tinted( child: body, onPressed: () {}, size: CupertinoButtonSize.small, ), CupertinoButton.filled( child: body, onPressed: () {}, size: CupertinoButtonSize.small, ), // medium Text('Medium'), CupertinoButton( child: body, onPressed: () {}, size: CupertinoButtonSize.medium, ), CupertinoButton.tinted( child: body, onPressed: () {}, size: CupertinoButtonSize.medium, color: CupertinoColors.systemGrey, ), CupertinoButton.tinted( child: body, onPressed: () {}, size: CupertinoButtonSize.medium, ), CupertinoButton.filled( child: body, onPressed: () {}, size: CupertinoButtonSize.medium, ), // large Text('Large'), CupertinoButton( child: body, onPressed: () {}, size: CupertinoButtonSize.large, ), CupertinoButton.tinted( child: body, onPressed: () {}, color: CupertinoColors.systemGrey, size: CupertinoButtonSize.large, ), CupertinoButton.tinted( child: body, onPressed: () {}, size: CupertinoButtonSize.large, ), CupertinoButton.filled( child: body, onPressed: () {}, size: CupertinoButtonSize.large, ), ].map((Widget w) => SizedBox(width: 110, height: 70, child: Center(child: w))).toList(), ), ) ), ); ``` *List which issues are fixed by this PR. You must list at least one issue. An issue is not required if the PR fixes something trivial like a typo.* *If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*
Buchimi
pushed a commit
to Buchimi/flutter
that referenced
this pull request
Sep 2, 2024
) **Fixes flutter#152846 in accordance with iOS HIG** Previously the `_CupertinoThemeDefaults _kDefaultTheme` would set the `primaryContrastingColor` to `CupertinoColors.systemBackground`, which was white-ish in light mode, and black-ish in dark mode. That was in accordance with Apple Design Resources from 5 years ago. > Before: > <img width="594" alt="image" src="proxy.php?url=https://github.com/user-attachments/assets/63e88abb-6933-446f-a7ba-55109d0f353c"> As of now, iOS HIG suggests that the `primaryContrastingColor` (in combination with the currently default `primaryColor: CupertinoColors.systemBlue`) be white (regardless of light/dark modes, contrast, elevation, etc.) > After: > <img width="594" alt="image" src="proxy.php?url=https://github.com/user-attachments/assets/2a48f22b-a886-46dd-aada-6d157cb4ac06"> Example code: ```dart import 'package:flutter/cupertino.dart'; import 'package:flutter/widgets.dart'; void main() => runApp( CupertinoApp( theme: CupertinoThemeData( brightness: Brightness.dark, ), home: Center(child: CupertinoButton.filled( onPressed: () {}, child: Row( mainAxisSize: MainAxisSize.min, children: <Widget>[ Icon(CupertinoIcons.add), Text('Add'), ], ), ) ) ) ); ```
Buchimi
pushed a commit
to Buchimi/flutter
that referenced
this pull request
Sep 2, 2024
…lutter#152845) This PR fixes flutter#92525 and introduces the following changes according to [latest iOS HIG](https://developer.apple.com/design/human-interface-guidelines/buttons#iOS-iPadOS): - `CupertinoButton` now has a `size` property (type `enum CupertinoButtonSize`, values sm/md/lg, default `lg`) that allows the devs to apply new iOS 15+ button styles - Previously `CupertinoButton` had a larger padding when no background color was specified. With the new HIG, that is no longer the case - `CupertinoButton` now has a `.tinted` constructor that renders a translucent background (transparency % is brightness-dependent) and uses a different foreground color compared to `.filled` - `CupertinoButton` now uses the `actionTextStyle` TextStyle from the given theme - `CupertinoButton`'s child IconTheme's size will always be x1.2 the given TextStyle's size - `CupertinoTextThemeData` now has a `actionSmallTextStyle` property to use with small buttons (including a default `_kDefaultActionSmallTextStyle` TextStyle) Preview & example:  > **NOTE**: there is a discrepancy in dark mode button foreground color between the default CupertinoTheme and the HIG. A separate issue will be opened for this. ~EDIT: issue reported here flutter#152846 EDIT2: fixed by flutter#153039 !  ## Example ```dart import 'package:flutter/cupertino.dart'; const Widget body = Row( mainAxisSize: MainAxisSize.min, mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[ Icon( CupertinoIcons.play_fill, ), Text("Play"), ], ); void main() => runApp( CupertinoApp( home: Container( child: Wrap( direction: Axis.horizontal, children: <Widget>[ // header Text(''), Text('Plain'), Text('Grey'), Text('Tinted'), Text('Filled'), // small Text('Small'), CupertinoButton( child: body, onPressed: () {}, size: CupertinoButtonSize.small, ), CupertinoButton.tinted( child: body, onPressed: () {}, size: CupertinoButtonSize.small, color: CupertinoColors.systemGrey, ), CupertinoButton.tinted( child: body, onPressed: () {}, size: CupertinoButtonSize.small, ), CupertinoButton.filled( child: body, onPressed: () {}, size: CupertinoButtonSize.small, ), // medium Text('Medium'), CupertinoButton( child: body, onPressed: () {}, size: CupertinoButtonSize.medium, ), CupertinoButton.tinted( child: body, onPressed: () {}, size: CupertinoButtonSize.medium, color: CupertinoColors.systemGrey, ), CupertinoButton.tinted( child: body, onPressed: () {}, size: CupertinoButtonSize.medium, ), CupertinoButton.filled( child: body, onPressed: () {}, size: CupertinoButtonSize.medium, ), // large Text('Large'), CupertinoButton( child: body, onPressed: () {}, size: CupertinoButtonSize.large, ), CupertinoButton.tinted( child: body, onPressed: () {}, color: CupertinoColors.systemGrey, size: CupertinoButtonSize.large, ), CupertinoButton.tinted( child: body, onPressed: () {}, size: CupertinoButtonSize.large, ), CupertinoButton.filled( child: body, onPressed: () {}, size: CupertinoButtonSize.large, ), ].map((Widget w) => SizedBox(width: 110, height: 70, child: Center(child: w))).toList(), ), ) ), ); ``` *List which issues are fixed by this PR. You must list at least one issue. An issue is not required if the PR fixes something trivial like a typo.* *If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Dec 11, 2024
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Dec 12, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #152846 in accordance with iOS HIG
Previously the
_CupertinoThemeDefaults _kDefaultThemewould set theprimaryContrastingColortoCupertinoColors.systemBackground, which was white-ish in light mode, and black-ish in dark mode. That was in accordance with Apple Design Resources from 5 years ago.As of now, iOS HIG suggests that the
primaryContrastingColor(in combination with the currently defaultprimaryColor: CupertinoColors.systemBlue) be white (regardless of light/dark modes, contrast, elevation, etc.)Example code:
Pre-launch Checklist
///).