Post libtxt/post iOS 11 fidelity fine tuning (#17366)
This commit is contained in:
@@ -1 +1 @@
|
||||
e3f3b6766b18e2461c89a371be6e30045d8e404f
|
||||
ed07132380cd2db6dd664be1479c5b89579e3304
|
||||
|
||||
@@ -73,7 +73,7 @@ class _CupertinoDialogDemoState extends State<CupertinoDialogDemo> {
|
||||
showDemoDialog<String>(
|
||||
context: context,
|
||||
child: new CupertinoAlertDialog(
|
||||
title: const Text('Allow "Maps" to access your location while you use the app?'),
|
||||
title: const Text('Allow "Maps" to access your location while you are using the app?'),
|
||||
content: const Text(
|
||||
'Your current location will be displayed on the map and used for directions, '
|
||||
'nearby search results, and estimated travel times.'
|
||||
|
||||
@@ -453,7 +453,7 @@ class Tab2Header extends StatelessWidget {
|
||||
'SUPPORT TICKET',
|
||||
style: const TextStyle(
|
||||
color: const Color(0xFF646464),
|
||||
letterSpacing: -0.8,
|
||||
letterSpacing: -0.9,
|
||||
fontSize: 14.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
@@ -484,8 +484,8 @@ class Tab2Header extends StatelessWidget {
|
||||
'Product or product packaging damaged during transit',
|
||||
style: const TextStyle(
|
||||
fontSize: 16.0,
|
||||
fontWeight: FontWeight.w800,
|
||||
letterSpacing: -0.6,
|
||||
fontWeight: FontWeight.w700,
|
||||
letterSpacing: -0.46,
|
||||
),
|
||||
),
|
||||
const Padding(padding: const EdgeInsets.only(top: 16.0)),
|
||||
@@ -577,10 +577,8 @@ class Tab2ConversationBubble extends StatelessWidget {
|
||||
? CupertinoColors.white
|
||||
: CupertinoColors.black,
|
||||
letterSpacing: -0.4,
|
||||
fontSize: 14.0,
|
||||
fontWeight: color == Tab2ConversationBubbleColor.blue
|
||||
? FontWeight.w300
|
||||
: FontWeight.w400,
|
||||
fontSize: 15.0,
|
||||
fontWeight: FontWeight.w400,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -183,7 +183,7 @@ class _ListItem extends StatelessWidget {
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: const TextStyle(
|
||||
fontWeight: FontWeight.w600,
|
||||
letterSpacing: -0.41,
|
||||
letterSpacing: -0.18,
|
||||
),
|
||||
),
|
||||
new Text(
|
||||
|
||||
@@ -122,8 +122,8 @@ class CupertinoTabBar extends StatelessWidget implements PreferredSizeWidget {
|
||||
style: new TextStyle(
|
||||
fontFamily: '.SF UI Text',
|
||||
fontSize: 10.0,
|
||||
letterSpacing: -0.24,
|
||||
fontWeight: FontWeight.w500,
|
||||
letterSpacing: 0.1,
|
||||
fontWeight: FontWeight.w400,
|
||||
color: inactiveColor,
|
||||
),
|
||||
child: new Padding(
|
||||
|
||||
@@ -15,8 +15,9 @@ const Color _kDisabledForeground = const Color(0xFFC4C4C4);
|
||||
const TextStyle _kButtonTextStyle = const TextStyle(
|
||||
fontFamily: '.SF UI Text',
|
||||
inherit: false,
|
||||
fontSize: 15.0,
|
||||
fontWeight: FontWeight.normal,
|
||||
fontSize: 17.5,
|
||||
letterSpacing: -0.24,
|
||||
fontWeight: FontWeight.w400,
|
||||
color: CupertinoColors.activeBlue,
|
||||
textBaseline: TextBaseline.alphabetic,
|
||||
);
|
||||
@@ -31,7 +32,7 @@ final TextStyle _kBackgroundButtonTextStyle = _kButtonTextStyle.copyWith(
|
||||
|
||||
const EdgeInsets _kButtonPadding = const EdgeInsets.all(16.0);
|
||||
const EdgeInsets _kBackgroundButtonPadding = const EdgeInsets.symmetric(
|
||||
vertical: 16.0,
|
||||
vertical: 14.0,
|
||||
horizontal: 64.0,
|
||||
);
|
||||
|
||||
|
||||
@@ -13,20 +13,21 @@ import 'scrollbar.dart';
|
||||
const TextStyle _kCupertinoDialogTitleStyle = const TextStyle(
|
||||
fontFamily: '.SF UI Display',
|
||||
inherit: false,
|
||||
fontSize: 17.5,
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: 18.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: CupertinoColors.black,
|
||||
height: 1.25,
|
||||
height: 1.06,
|
||||
letterSpacing: 0.48,
|
||||
textBaseline: TextBaseline.alphabetic,
|
||||
);
|
||||
|
||||
const TextStyle _kCupertinoDialogContentStyle = const TextStyle(
|
||||
fontFamily: '.SF UI Text',
|
||||
inherit: false,
|
||||
fontSize: 12.4,
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: 13.4,
|
||||
fontWeight: FontWeight.w300,
|
||||
color: CupertinoColors.black,
|
||||
height: 1.35,
|
||||
height: 1.036,
|
||||
textBaseline: TextBaseline.alphabetic,
|
||||
);
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ const TextStyle _kLargeTitleTextStyle = const TextStyle(
|
||||
fontFamily: '.SF UI Text',
|
||||
fontSize: 34.0,
|
||||
fontWeight: FontWeight.w700,
|
||||
letterSpacing: -1.4,
|
||||
letterSpacing: -0.26,
|
||||
color: CupertinoColors.black,
|
||||
);
|
||||
|
||||
@@ -375,7 +375,7 @@ class _CupertinoPersistentNavigationBar extends StatelessWidget implements Prefe
|
||||
final Widget styledMiddle = middle == null ? null : new DefaultTextStyle(
|
||||
style: actionsStyle.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
letterSpacing: -0.72,
|
||||
letterSpacing: -0.08,
|
||||
color: CupertinoColors.black,
|
||||
),
|
||||
child: middle,
|
||||
|
||||
@@ -153,7 +153,7 @@ void main() {
|
||||
expect(tester.getSize(find.byType(DecoratedBox).at(1)), equals(const Size(270.0, 560.0)));
|
||||
|
||||
// Check sizes/locations of the text.
|
||||
expect(tester.getSize(find.text('The Title')), equals(const Size(230.0, 198.0)));
|
||||
expect(tester.getSize(find.text('The Title')), equals(const Size(230.0, 171.0)));
|
||||
expect(tester.getSize(find.text('Cancel')), equals(const Size(75.0, 300.0)));
|
||||
expect(tester.getSize(find.text('OK')), equals(const Size(75.0, 100.0)));
|
||||
expect(tester.getTopLeft(find.text('The Title')), equals(const Offset(285.0, 40.0)));
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/rendering.dart';
|
||||
import 'package:flutter_test/flutter_test.dart' hide TypeMatcher;
|
||||
@@ -81,7 +83,7 @@ void main() {
|
||||
builder: (BuildContext context) {
|
||||
return const CupertinoNavigationBar(
|
||||
leading: const _ExpectStyles(color: const Color(0xFF001122), index: 0x000001),
|
||||
middle: const _ExpectStyles(color: const Color(0xFF000000), letterSpacing: -0.72, index: 0x000100),
|
||||
middle: const _ExpectStyles(color: const Color(0xFF000000), letterSpacing: -0.08, index: 0x000100),
|
||||
trailing: const _ExpectStyles(color: const Color(0xFF001122), index: 0x010000),
|
||||
actionsForegroundColor: const Color(0xFF001122),
|
||||
);
|
||||
@@ -481,6 +483,80 @@ void main() {
|
||||
final BoxDecoration decoration = decoratedBox.decoration;
|
||||
expect(decoration.border, isNull);
|
||||
});
|
||||
|
||||
testWidgets(
|
||||
'Standard title golden',
|
||||
(WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
new WidgetsApp(
|
||||
color: const Color(0xFFFFFFFF),
|
||||
onGenerateRoute: (RouteSettings settings) {
|
||||
return new CupertinoPageRoute<void>(
|
||||
settings: settings,
|
||||
builder: (BuildContext context) {
|
||||
return const RepaintBoundary(
|
||||
child: const CupertinoPageScaffold(
|
||||
navigationBar: const CupertinoNavigationBar(
|
||||
middle: const Text('Bling bling'),
|
||||
),
|
||||
child: const Center(),
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
|
||||
await expectLater(
|
||||
find.byType(RepaintBoundary).last,
|
||||
matchesGoldenFile('nav_bar_test.standard_title.1.png'),
|
||||
);
|
||||
},
|
||||
// TODO(xster): remove once https://github.com/flutter/flutter/issues/17483
|
||||
// is fixed.
|
||||
skip: !Platform.isLinux,
|
||||
);
|
||||
|
||||
testWidgets(
|
||||
'Large title golden',
|
||||
(WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
new WidgetsApp(
|
||||
color: const Color(0xFFFFFFFF),
|
||||
onGenerateRoute: (RouteSettings settings) {
|
||||
return new CupertinoPageRoute<void>(
|
||||
settings: settings,
|
||||
builder: (BuildContext context) {
|
||||
return new CupertinoPageScaffold(
|
||||
child: new CustomScrollView(
|
||||
slivers: <Widget>[
|
||||
const CupertinoSliverNavigationBar(
|
||||
largeTitle: const Text('Bling bling'),
|
||||
),
|
||||
new SliverToBoxAdapter(
|
||||
child: new Container(
|
||||
height: 1200.0,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
|
||||
await expectLater(
|
||||
find.byType(RepaintBoundary).last,
|
||||
matchesGoldenFile('nav_bar_test.large_title.1.png'),
|
||||
);
|
||||
},
|
||||
// TODO(xster): remove once https://github.com/flutter/flutter/issues/17483
|
||||
// is fixed.
|
||||
skip: !Platform.isLinux,
|
||||
);
|
||||
}
|
||||
|
||||
class _ExpectStyles extends StatelessWidget {
|
||||
|
||||
Reference in New Issue
Block a user