Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
e42c50cf
Unverified
Commit
e42c50cf
authored
May 11, 2018
by
xster
Committed by
GitHub
May 11, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Post libtxt/post iOS 11 fidelity fine tuning (#17366)
parent
c2c64a5a
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
101 additions
and
25 deletions
+101
-25
goldens.version
bin/internal/goldens.version
+1
-1
cupertino_dialog_demo.dart
...ter_gallery/lib/demo/cupertino/cupertino_dialog_demo.dart
+1
-1
cupertino_navigation_demo.dart
...gallery/lib/demo/cupertino/cupertino_navigation_demo.dart
+5
-7
cupertino_refresh_demo.dart
...er_gallery/lib/demo/cupertino/cupertino_refresh_demo.dart
+1
-1
bottom_tab_bar.dart
packages/flutter/lib/src/cupertino/bottom_tab_bar.dart
+2
-2
button.dart
packages/flutter/lib/src/cupertino/button.dart
+4
-3
dialog.dart
packages/flutter/lib/src/cupertino/dialog.dart
+7
-6
nav_bar.dart
packages/flutter/lib/src/cupertino/nav_bar.dart
+2
-2
dialog_test.dart
packages/flutter/test/cupertino/dialog_test.dart
+1
-1
nav_bar_test.dart
packages/flutter/test/cupertino/nav_bar_test.dart
+77
-1
No files found.
bin/internal/goldens.version
View file @
e42c50cf
e
3f3b6766b18e2461c89a371be6e30045d8e404f
e
d07132380cd2db6dd664be1479c5b89579e3304
examples/flutter_gallery/lib/demo/cupertino/cupertino_dialog_demo.dart
View file @
e42c50cf
...
...
@@ -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.'
...
...
examples/flutter_gallery/lib/demo/cupertino/cupertino_navigation_demo.dart
View file @
e42c50cf
...
...
@@ -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
.
w
8
00
,
letterSpacing:
-
0.6
,
fontWeight:
FontWeight
.
w
7
00
,
letterSpacing:
-
0.
4
6
,
),
),
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
,
),
),
);
...
...
examples/flutter_gallery/lib/demo/cupertino/cupertino_refresh_demo.dart
View file @
e42c50cf
...
...
@@ -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
(
...
...
packages/flutter/lib/src/cupertino/bottom_tab_bar.dart
View file @
e42c50cf
...
...
@@ -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
.
w
5
00
,
letterSpacing:
0.1
,
fontWeight:
FontWeight
.
w
4
00
,
color:
inactiveColor
,
),
child:
new
Padding
(
...
...
packages/flutter/lib/src/cupertino/button.dart
View file @
e42c50cf
...
...
@@ -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:
1
6
.0
,
vertical:
1
4
.0
,
horizontal:
64.0
,
);
...
...
packages/flutter/lib/src/cupertino/dialog.dart
View file @
e42c50cf
...
...
@@ -13,20 +13,21 @@ import 'scrollbar.dart';
const
TextStyle
_kCupertinoDialogTitleStyle
=
const
TextStyle
(
fontFamily:
'.SF UI Display'
,
inherit:
false
,
fontSize:
1
7.5
,
fontWeight:
FontWeight
.
w
6
00
,
fontSize:
1
8.0
,
fontWeight:
FontWeight
.
w
5
00
,
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:
1
2
.4
,
fontWeight:
FontWeight
.
w
5
00
,
fontSize:
1
3
.4
,
fontWeight:
FontWeight
.
w
3
00
,
color:
CupertinoColors
.
black
,
height:
1.
35
,
height:
1.
036
,
textBaseline:
TextBaseline
.
alphabetic
,
);
...
...
packages/flutter/lib/src/cupertino/nav_bar.dart
View file @
e42c50cf
...
...
@@ -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
,
...
...
packages/flutter/test/cupertino/dialog_test.dart
View file @
e42c50cf
...
...
@@ -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
,
1
98
.0
)));
expect
(
tester
.
getSize
(
find
.
text
(
'The Title'
)),
equals
(
const
Size
(
230.0
,
1
71
.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
)));
...
...
packages/flutter/test/cupertino/nav_bar_test.dart
View file @
e42c50cf
...
...
@@ -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
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment