Change dialog font family (#141295)
Fixes #139434. Changes the font from "Text" to "Display". We should only be using the "Display" font for fonts of size 20 and above. Previously "Display" was not showing correctly so this font being wrong was flying under the radar. Before: <img width="315" alt="Screenshot 2024-01-10 at 10 49 26â¯AM" src="https://github.com/flutter/flutter/assets/58190796/c8beba30-04d2-4c22-86ae-85c0576136ee"> After: <img width="289" alt="Screenshot 2024-01-10 at 10 52 11â¯AM" src="https://github.com/flutter/flutter/assets/58190796/c6b33aaf-791c-460e-a640-37d8ddf3f713">
This commit is contained in:
parent
6967ae551e
commit
e67e951388
@ -23,7 +23,7 @@ import 'theme.dart';
|
||||
// Apple Design Resources(https://developer.apple.com/design/resources/).
|
||||
// However the values are not exactly the same as native, so eyeballing is needed.
|
||||
const TextStyle _kCupertinoDialogTitleStyle = TextStyle(
|
||||
fontFamily: 'CupertinoSystemDisplay',
|
||||
fontFamily: 'CupertinoSystemText',
|
||||
inherit: false,
|
||||
fontSize: 17.0,
|
||||
fontWeight: FontWeight.w600,
|
||||
|
@ -140,6 +140,7 @@ void main() {
|
||||
final DefaultTextStyle widget = tester.widget(find.byType(DefaultTextStyle));
|
||||
|
||||
expect(widget.style.color!.withAlpha(255), CupertinoColors.systemGreen.color);
|
||||
expect(widget.style.fontFamily, 'CupertinoSystemText');
|
||||
});
|
||||
|
||||
testWidgets('Dialog dark theme', (WidgetTester tester) async {
|
||||
|
Loading…
x
Reference in New Issue
Block a user