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
f0d44472
Unverified
Commit
f0d44472
authored
Feb 25, 2022
by
Simon
Committed by
GitHub
Feb 25, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correct font weight for Cupertino tab label (#90109)
parent
c7643cf5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
63 additions
and
0 deletions
+63
-0
text_theme.dart
packages/flutter/lib/src/cupertino/text_theme.dart
+1
-0
text_theme_test.dart
packages/flutter/test/cupertino/text_theme_test.dart
+62
-0
No files found.
packages/flutter/lib/src/cupertino/text_theme.dart
View file @
f0d44472
...
...
@@ -45,6 +45,7 @@ const TextStyle _kDefaultTabLabelTextStyle = TextStyle(
inherit:
false
,
fontFamily:
'.SF Pro Text'
,
fontSize:
10.0
,
fontWeight:
FontWeight
.
w500
,
letterSpacing:
-
0.24
,
color:
CupertinoColors
.
inactiveGray
,
);
...
...
packages/flutter/test/cupertino/text_theme_test.dart
0 → 100644
View file @
f0d44472
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'package:flutter/cupertino.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
void
main
(
)
{
test
(
'CupertinoTextTheme matches Apple Design resources'
,
()
{
// Check the default cupertino text theme against the style values
// Values derived from https://developer.apple.com/design/resources/.
const
CupertinoTextThemeData
theme
=
CupertinoTextThemeData
();
const
FontWeight
normal
=
FontWeight
.
normal
;
const
FontWeight
regular
=
FontWeight
.
w400
;
const
FontWeight
medium
=
FontWeight
.
w500
;
const
FontWeight
semiBold
=
FontWeight
.
w600
;
const
FontWeight
bold
=
FontWeight
.
w700
;
// TextStyle 17 -0.41
expect
(
theme
.
textStyle
.
fontSize
,
17
);
expect
(
theme
.
textStyle
.
fontFamily
,
'.SF Pro Text'
);
expect
(
theme
.
textStyle
.
letterSpacing
,
-
0.41
);
expect
(
theme
.
textStyle
.
fontWeight
,
null
);
// ActionTextStyle 17 -0.41
expect
(
theme
.
actionTextStyle
.
fontSize
,
17
);
expect
(
theme
.
actionTextStyle
.
fontFamily
,
'.SF Pro Text'
);
expect
(
theme
.
actionTextStyle
.
letterSpacing
,
-
0.41
);
expect
(
theme
.
actionTextStyle
.
fontWeight
,
null
);
// TextStyle 17 -0.41
expect
(
theme
.
tabLabelTextStyle
.
fontSize
,
10
);
expect
(
theme
.
tabLabelTextStyle
.
fontFamily
,
'.SF Pro Text'
);
expect
(
theme
.
tabLabelTextStyle
.
letterSpacing
,
-
0.24
);
expect
(
theme
.
tabLabelTextStyle
.
fontWeight
,
medium
);
// NavTitle SemiBold 17 -0.41
expect
(
theme
.
navTitleTextStyle
.
fontSize
,
17
);
expect
(
theme
.
navTitleTextStyle
.
fontFamily
,
'.SF Pro Text'
);
expect
(
theme
.
navTitleTextStyle
.
letterSpacing
,
-
0.41
);
expect
(
theme
.
navTitleTextStyle
.
fontWeight
,
semiBold
);
// NavLargeTitle Bold 34 0.41
expect
(
theme
.
navLargeTitleTextStyle
.
fontSize
,
34
);
expect
(
theme
.
navLargeTitleTextStyle
.
fontFamily
,
'.SF Pro Display'
);
expect
(
theme
.
navLargeTitleTextStyle
.
letterSpacing
,
0.41
);
expect
(
theme
.
navLargeTitleTextStyle
.
fontWeight
,
bold
);
// Picker Regular 21 -0.6
expect
(
theme
.
pickerTextStyle
.
fontSize
,
21
);
expect
(
theme
.
pickerTextStyle
.
fontFamily
,
'.SF Pro Display'
);
expect
(
theme
.
pickerTextStyle
.
letterSpacing
,
-
0.6
);
expect
(
theme
.
pickerTextStyle
.
fontWeight
,
regular
);
// DateTimePicker Normal 21
expect
(
theme
.
dateTimePickerTextStyle
.
fontSize
,
21
);
expect
(
theme
.
dateTimePickerTextStyle
.
fontFamily
,
'.SF Pro Display'
);
expect
(
theme
.
dateTimePickerTextStyle
.
letterSpacing
,
null
);
expect
(
theme
.
dateTimePickerTextStyle
.
fontWeight
,
normal
);
});
}
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