From ac0c44fc1a10ea2ba0d5c2aa5a23471682f9b543 Mon Sep 17 00:00:00 2001 From: xster Date: Tue, 5 Jun 2018 15:38:05 -0700 Subject: [PATCH] Small fidelity adjustments for Cupertino (#18104) --- bin/internal/goldens.version | 2 +- packages/flutter/lib/src/cupertino/icons.dart | 3 +++ packages/flutter/lib/src/cupertino/nav_bar.dart | 6 +++--- packages/flutter/test/cupertino/nav_bar_test.dart | 6 +++--- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/bin/internal/goldens.version b/bin/internal/goldens.version index 3fe3e00da9..6e25562a8a 100644 --- a/bin/internal/goldens.version +++ b/bin/internal/goldens.version @@ -1 +1 @@ -17b9d558228edad27729a0c1823430d73cb26608 +760320e3fc8ccd12deb4066bd4033a98d078359f diff --git a/packages/flutter/lib/src/cupertino/icons.dart b/packages/flutter/lib/src/cupertino/icons.dart index 861fe970ce..fa2a845882 100644 --- a/packages/flutter/lib/src/cupertino/icons.dart +++ b/packages/flutter/lib/src/cupertino/icons.dart @@ -86,6 +86,9 @@ class CupertinoIcons { /// A thicker left chevron used in iOS for the navigation bar back button. static const IconData back = const IconData(0xf3cf, fontFamily: iconFont, fontPackage: iconFontPackage, matchTextDirection: true); + /// A thicker right chevron that's the reverse of [back]. + static const IconData forward = const IconData(0xf3d1, fontFamily: iconFont, fontPackage: iconFontPackage, matchTextDirection: true); + /// Outline of a simple front-facing house. static const IconData home = const IconData(0xf447, fontFamily: iconFont, fontPackage: iconFontPackage); diff --git a/packages/flutter/lib/src/cupertino/nav_bar.dart b/packages/flutter/lib/src/cupertino/nav_bar.dart index 1e092a7c31..749b3418f8 100644 --- a/packages/flutter/lib/src/cupertino/nav_bar.dart +++ b/packages/flutter/lib/src/cupertino/nav_bar.dart @@ -18,7 +18,7 @@ const double _kNavBarPersistentHeight = 44.0; /// Size increase from expanding the navigation bar into an iOS-11-style large title /// form in a [CustomScrollView]. -const double _kNavBarLargeTitleHeightExtension = 56.0; +const double _kNavBarLargeTitleHeightExtension = 52.0; /// Number of logical pixels scrolled down before the title text is transferred /// from the normal navigation bar to a big title below the navigation bar. @@ -46,10 +46,10 @@ const Border _kDefaultNavBarBorder = const Border( ); const TextStyle _kLargeTitleTextStyle = const TextStyle( - fontFamily: '.SF UI Text', + fontFamily: '.SF Pro Display', fontSize: 34.0, fontWeight: FontWeight.w700, - letterSpacing: -0.26, + letterSpacing: 0.24, color: CupertinoColors.black, ); diff --git a/packages/flutter/test/cupertino/nav_bar_test.dart b/packages/flutter/test/cupertino/nav_bar_test.dart index 5fecbd436a..ee572d81e0 100644 --- a/packages/flutter/test/cupertino/nav_bar_test.dart +++ b/packages/flutter/test/cupertino/nav_bar_test.dart @@ -171,7 +171,7 @@ void main() { expect(tester.getTopRight(find.byKey(trailingKey)), const Offset(800.0 - 16.0 - 40.0, 10.0)); // Top and left padding is applied to large title. - expect(tester.getTopLeft(find.byKey(titleKey)), const Offset(16.0 + 20.0, 58.0 + 10.0)); + expect(tester.getTopLeft(find.byKey(titleKey)), const Offset(16.0 + 20.0, 54.0 + 10.0)); }); testWidgets('Large title nav bar scrolls', (WidgetTester tester) async { @@ -229,7 +229,7 @@ void main() { ]); expect(tester.getTopLeft(find.widgetWithText(OverflowBox, 'Title')).dy, 44.0); - expect(tester.getSize(find.widgetWithText(OverflowBox, 'Title')).height, 56.0); + expect(tester.getSize(find.widgetWithText(OverflowBox, 'Title')).height, 52.0); scrollController.jumpTo(600.0); await tester.pump(); // Once to trigger the opacity animation. @@ -313,7 +313,7 @@ void main() { isNull, ); - expect(tester.getBottomLeft(find.text('Title')).dy, 44.0 + 56.0 - 8.0); // Static part + extension - padding. + expect(tester.getBottomLeft(find.text('Title')).dy, 44.0 + 52.0 - 8.0); // Static part + extension - padding. scrollController.jumpTo(600.0); await tester.pump(); // Once to trigger the opacity animation.