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> {
...
@@ -73,7 +73,7 @@ class _CupertinoDialogDemoState extends State<CupertinoDialogDemo> {
showDemoDialog
<
String
>(
showDemoDialog
<
String
>(
context:
context
,
context:
context
,
child:
new
CupertinoAlertDialog
(
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
(
content:
const
Text
(
'Your current location will be displayed on the map and used for directions, '
'Your current location will be displayed on the map and used for directions, '
'nearby search results, and estimated travel times.'
'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 {
...
@@ -453,7 +453,7 @@ class Tab2Header extends StatelessWidget {
'SUPPORT TICKET'
,
'SUPPORT TICKET'
,
style:
const
TextStyle
(
style:
const
TextStyle
(
color:
const
Color
(
0xFF646464
),
color:
const
Color
(
0xFF646464
),
letterSpacing:
-
0.
8
,
letterSpacing:
-
0.
9
,
fontSize:
14.0
,
fontSize:
14.0
,
fontWeight:
FontWeight
.
w500
,
fontWeight:
FontWeight
.
w500
,
),
),
...
@@ -484,8 +484,8 @@ class Tab2Header extends StatelessWidget {
...
@@ -484,8 +484,8 @@ class Tab2Header extends StatelessWidget {
'Product or product packaging damaged during transit'
,
'Product or product packaging damaged during transit'
,
style:
const
TextStyle
(
style:
const
TextStyle
(
fontSize:
16.0
,
fontSize:
16.0
,
fontWeight:
FontWeight
.
w
8
00
,
fontWeight:
FontWeight
.
w
7
00
,
letterSpacing:
-
0.6
,
letterSpacing:
-
0.
4
6
,
),
),
),
),
const
Padding
(
padding:
const
EdgeInsets
.
only
(
top:
16.0
)),
const
Padding
(
padding:
const
EdgeInsets
.
only
(
top:
16.0
)),
...
@@ -577,10 +577,8 @@ class Tab2ConversationBubble extends StatelessWidget {
...
@@ -577,10 +577,8 @@ class Tab2ConversationBubble extends StatelessWidget {
?
CupertinoColors
.
white
?
CupertinoColors
.
white
:
CupertinoColors
.
black
,
:
CupertinoColors
.
black
,
letterSpacing:
-
0.4
,
letterSpacing:
-
0.4
,
fontSize:
14.0
,
fontSize:
15.0
,
fontWeight:
color
==
Tab2ConversationBubbleColor
.
blue
fontWeight:
FontWeight
.
w400
,
?
FontWeight
.
w300
:
FontWeight
.
w400
,
),
),
),
),
);
);
...
...
examples/flutter_gallery/lib/demo/cupertino/cupertino_refresh_demo.dart
View file @
e42c50cf
...
@@ -183,7 +183,7 @@ class _ListItem extends StatelessWidget {
...
@@ -183,7 +183,7 @@ class _ListItem extends StatelessWidget {
overflow:
TextOverflow
.
ellipsis
,
overflow:
TextOverflow
.
ellipsis
,
style:
const
TextStyle
(
style:
const
TextStyle
(
fontWeight:
FontWeight
.
w600
,
fontWeight:
FontWeight
.
w600
,
letterSpacing:
-
0.
41
,
letterSpacing:
-
0.
18
,
),
),
),
),
new
Text
(
new
Text
(
...
...
packages/flutter/lib/src/cupertino/bottom_tab_bar.dart
View file @
e42c50cf
...
@@ -122,8 +122,8 @@ class CupertinoTabBar extends StatelessWidget implements PreferredSizeWidget {
...
@@ -122,8 +122,8 @@ class CupertinoTabBar extends StatelessWidget implements PreferredSizeWidget {
style:
new
TextStyle
(
style:
new
TextStyle
(
fontFamily:
'.SF UI Text'
,
fontFamily:
'.SF UI Text'
,
fontSize:
10.0
,
fontSize:
10.0
,
letterSpacing:
-
0.24
,
letterSpacing:
0.1
,
fontWeight:
FontWeight
.
w
5
00
,
fontWeight:
FontWeight
.
w
4
00
,
color:
inactiveColor
,
color:
inactiveColor
,
),
),
child:
new
Padding
(
child:
new
Padding
(
...
...
packages/flutter/lib/src/cupertino/button.dart
View file @
e42c50cf
...
@@ -15,8 +15,9 @@ const Color _kDisabledForeground = const Color(0xFFC4C4C4);
...
@@ -15,8 +15,9 @@ const Color _kDisabledForeground = const Color(0xFFC4C4C4);
const
TextStyle
_kButtonTextStyle
=
const
TextStyle
(
const
TextStyle
_kButtonTextStyle
=
const
TextStyle
(
fontFamily:
'.SF UI Text'
,
fontFamily:
'.SF UI Text'
,
inherit:
false
,
inherit:
false
,
fontSize:
15.0
,
fontSize:
17.5
,
fontWeight:
FontWeight
.
normal
,
letterSpacing:
-
0.24
,
fontWeight:
FontWeight
.
w400
,
color:
CupertinoColors
.
activeBlue
,
color:
CupertinoColors
.
activeBlue
,
textBaseline:
TextBaseline
.
alphabetic
,
textBaseline:
TextBaseline
.
alphabetic
,
);
);
...
@@ -31,7 +32,7 @@ final TextStyle _kBackgroundButtonTextStyle = _kButtonTextStyle.copyWith(
...
@@ -31,7 +32,7 @@ final TextStyle _kBackgroundButtonTextStyle = _kButtonTextStyle.copyWith(
const
EdgeInsets
_kButtonPadding
=
const
EdgeInsets
.
all
(
16.0
);
const
EdgeInsets
_kButtonPadding
=
const
EdgeInsets
.
all
(
16.0
);
const
EdgeInsets
_kBackgroundButtonPadding
=
const
EdgeInsets
.
symmetric
(
const
EdgeInsets
_kBackgroundButtonPadding
=
const
EdgeInsets
.
symmetric
(
vertical:
1
6
.0
,
vertical:
1
4
.0
,
horizontal:
64.0
,
horizontal:
64.0
,
);
);
...
...
packages/flutter/lib/src/cupertino/dialog.dart
View file @
e42c50cf
...
@@ -13,20 +13,21 @@ import 'scrollbar.dart';
...
@@ -13,20 +13,21 @@ import 'scrollbar.dart';
const
TextStyle
_kCupertinoDialogTitleStyle
=
const
TextStyle
(
const
TextStyle
_kCupertinoDialogTitleStyle
=
const
TextStyle
(
fontFamily:
'.SF UI Display'
,
fontFamily:
'.SF UI Display'
,
inherit:
false
,
inherit:
false
,
fontSize:
1
7.5
,
fontSize:
1
8.0
,
fontWeight:
FontWeight
.
w
6
00
,
fontWeight:
FontWeight
.
w
5
00
,
color:
CupertinoColors
.
black
,
color:
CupertinoColors
.
black
,
height:
1.25
,
height:
1.06
,
letterSpacing:
0.48
,
textBaseline:
TextBaseline
.
alphabetic
,
textBaseline:
TextBaseline
.
alphabetic
,
);
);
const
TextStyle
_kCupertinoDialogContentStyle
=
const
TextStyle
(
const
TextStyle
_kCupertinoDialogContentStyle
=
const
TextStyle
(
fontFamily:
'.SF UI Text'
,
fontFamily:
'.SF UI Text'
,
inherit:
false
,
inherit:
false
,
fontSize:
1
2
.4
,
fontSize:
1
3
.4
,
fontWeight:
FontWeight
.
w
5
00
,
fontWeight:
FontWeight
.
w
3
00
,
color:
CupertinoColors
.
black
,
color:
CupertinoColors
.
black
,
height:
1.
35
,
height:
1.
036
,
textBaseline:
TextBaseline
.
alphabetic
,
textBaseline:
TextBaseline
.
alphabetic
,
);
);
...
...
packages/flutter/lib/src/cupertino/nav_bar.dart
View file @
e42c50cf
...
@@ -49,7 +49,7 @@ const TextStyle _kLargeTitleTextStyle = const TextStyle(
...
@@ -49,7 +49,7 @@ const TextStyle _kLargeTitleTextStyle = const TextStyle(
fontFamily:
'.SF UI Text'
,
fontFamily:
'.SF UI Text'
,
fontSize:
34.0
,
fontSize:
34.0
,
fontWeight:
FontWeight
.
w700
,
fontWeight:
FontWeight
.
w700
,
letterSpacing:
-
1.4
,
letterSpacing:
-
0.26
,
color:
CupertinoColors
.
black
,
color:
CupertinoColors
.
black
,
);
);
...
@@ -375,7 +375,7 @@ class _CupertinoPersistentNavigationBar extends StatelessWidget implements Prefe
...
@@ -375,7 +375,7 @@ class _CupertinoPersistentNavigationBar extends StatelessWidget implements Prefe
final
Widget
styledMiddle
=
middle
==
null
?
null
:
new
DefaultTextStyle
(
final
Widget
styledMiddle
=
middle
==
null
?
null
:
new
DefaultTextStyle
(
style:
actionsStyle
.
copyWith
(
style:
actionsStyle
.
copyWith
(
fontWeight:
FontWeight
.
w600
,
fontWeight:
FontWeight
.
w600
,
letterSpacing:
-
0.
72
,
letterSpacing:
-
0.
08
,
color:
CupertinoColors
.
black
,
color:
CupertinoColors
.
black
,
),
),
child:
middle
,
child:
middle
,
...
...
packages/flutter/test/cupertino/dialog_test.dart
View file @
e42c50cf
...
@@ -153,7 +153,7 @@ void main() {
...
@@ -153,7 +153,7 @@ void main() {
expect
(
tester
.
getSize
(
find
.
byType
(
DecoratedBox
).
at
(
1
)),
equals
(
const
Size
(
270.0
,
560.0
)));
expect
(
tester
.
getSize
(
find
.
byType
(
DecoratedBox
).
at
(
1
)),
equals
(
const
Size
(
270.0
,
560.0
)));
// Check sizes/locations of the text.
// 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
(
'Cancel'
)),
equals
(
const
Size
(
75.0
,
300.0
)));
expect
(
tester
.
getSize
(
find
.
text
(
'OK'
)),
equals
(
const
Size
(
75.0
,
100.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
)));
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 @@
...
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// found in the LICENSE file.
import
'dart:io'
;
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/rendering.dart'
;
import
'package:flutter/rendering.dart'
;
import
'package:flutter_test/flutter_test.dart'
hide
TypeMatcher
;
import
'package:flutter_test/flutter_test.dart'
hide
TypeMatcher
;
...
@@ -81,7 +83,7 @@ void main() {
...
@@ -81,7 +83,7 @@ void main() {
builder:
(
BuildContext
context
)
{
builder:
(
BuildContext
context
)
{
return
const
CupertinoNavigationBar
(
return
const
CupertinoNavigationBar
(
leading:
const
_ExpectStyles
(
color:
const
Color
(
0xFF001122
),
index:
0x000001
),
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
),
trailing:
const
_ExpectStyles
(
color:
const
Color
(
0xFF001122
),
index:
0x010000
),
actionsForegroundColor:
const
Color
(
0xFF001122
),
actionsForegroundColor:
const
Color
(
0xFF001122
),
);
);
...
@@ -481,6 +483,80 @@ void main() {
...
@@ -481,6 +483,80 @@ void main() {
final
BoxDecoration
decoration
=
decoratedBox
.
decoration
;
final
BoxDecoration
decoration
=
decoratedBox
.
decoration
;
expect
(
decoration
.
border
,
isNull
);
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
{
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