| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // See http://www.google.com/design/spec/style/typography.html | 5 // See http://www.google.com/design/spec/style/typography.html |
| 6 | 6 |
| 7 import 'dart:sky'; | 7 import 'dart:sky'; |
| 8 | 8 |
| 9 import '../painting/text_style.dart'; | 9 import '../painting/text_style.dart'; |
| 10 | 10 |
| 11 // TODO(eseidel): Font weights are supposed to be language relative! | 11 // TODO(eseidel): Font weights are supposed to be language relative! |
| 12 // These values are for English-like text. | 12 // These values are for English-like text. |
| 13 class _TextTheme { | 13 class TextTheme { |
| 14 _TextTheme(Color color54, Color color87) | 14 TextTheme._(Color color54, Color color87) |
| 15 : display4 = new TextStyle(fontSize: 112.0, fontWeight: FontWeight.w100, col
or: color54), | 15 : display4 = new TextStyle(fontSize: 112.0, fontWeight: FontWeight.w100, col
or: color54), |
| 16 display3 = new TextStyle(fontSize: 56.0, fontWeight: FontWeight.w400, col
or: color54), | 16 display3 = new TextStyle(fontSize: 56.0, fontWeight: FontWeight.w400, col
or: color54), |
| 17 display2 = new TextStyle(fontSize: 45.0, fontWeight: FontWeight.w400, col
or: color54), | 17 display2 = new TextStyle(fontSize: 45.0, fontWeight: FontWeight.w400, col
or: color54), |
| 18 display1 = new TextStyle(fontSize: 34.0, fontWeight: FontWeight.w400, col
or: color54), | 18 display1 = new TextStyle(fontSize: 34.0, fontWeight: FontWeight.w400, col
or: color54), |
| 19 headline = new TextStyle(fontSize: 24.0, fontWeight: FontWeight.w400, col
or: color87), | 19 headline = new TextStyle(fontSize: 24.0, fontWeight: FontWeight.w400, col
or: color87), |
| 20 title = new TextStyle(fontSize: 20.0, fontWeight: FontWeight.w500, col
or: color87), | 20 title = new TextStyle(fontSize: 20.0, fontWeight: FontWeight.w500, col
or: color87), |
| 21 subhead = new TextStyle(fontSize: 16.0, fontWeight: FontWeight.w400, col
or: color87), | 21 subhead = new TextStyle(fontSize: 16.0, fontWeight: FontWeight.w400, col
or: color87), |
| 22 body2 = new TextStyle(fontSize: 14.0, fontWeight: FontWeight.w500, col
or: color87), | 22 body2 = new TextStyle(fontSize: 14.0, fontWeight: FontWeight.w500, col
or: color87), |
| 23 body1 = new TextStyle(fontSize: 14.0, fontWeight: FontWeight.w400, col
or: color87), | 23 body1 = new TextStyle(fontSize: 14.0, fontWeight: FontWeight.w400, col
or: color87), |
| 24 caption = new TextStyle(fontSize: 12.0, fontWeight: FontWeight.w400, col
or: color54), | 24 caption = new TextStyle(fontSize: 12.0, fontWeight: FontWeight.w400, col
or: color54), |
| 25 button = new TextStyle(fontSize: 14.0, fontWeight: FontWeight.w500, col
or: color87); | 25 button = new TextStyle(fontSize: 14.0, fontWeight: FontWeight.w500, col
or: color87); |
| 26 | 26 |
| 27 final TextStyle display4; | 27 final TextStyle display4; |
| 28 final TextStyle display3; | 28 final TextStyle display3; |
| 29 final TextStyle display2; | 29 final TextStyle display2; |
| 30 final TextStyle display1; | 30 final TextStyle display1; |
| 31 final TextStyle headline; | 31 final TextStyle headline; |
| 32 final TextStyle title; | 32 final TextStyle title; |
| 33 final TextStyle subhead; | 33 final TextStyle subhead; |
| 34 final TextStyle body2; | 34 final TextStyle body2; |
| 35 final TextStyle body1; | 35 final TextStyle body1; |
| 36 final TextStyle caption; | 36 final TextStyle caption; |
| 37 final TextStyle button; | 37 final TextStyle button; |
| 38 } | 38 } |
| 39 | 39 |
| 40 | 40 |
| 41 final _TextTheme black = new _TextTheme( | 41 final TextTheme black = new TextTheme._( |
| 42 const Color(0xFF757575), | 42 const Color(0xFF757575), |
| 43 const Color(0xFF212121) | 43 const Color(0xFF212121) |
| 44 ); | 44 ); |
| 45 | 45 |
| 46 | 46 |
| 47 final _TextTheme white = new _TextTheme( | 47 final TextTheme white = new TextTheme._( |
| 48 const Color(0xFF8A8A8A), | 48 const Color(0xFF8A8A8A), |
| 49 const Color(0xFFDEDEDE) | 49 const Color(0xFFDEDEDE) |
| 50 ); | 50 ); |
| 51 | 51 |
| 52 // TODO(abarth): Maybe this should be hard-coded in Scaffold? | 52 // TODO(abarth): Maybe this should be hard-coded in Scaffold? |
| 53 const String typeface = 'font-family: sans-serif'; | 53 const String typeface = 'font-family: sans-serif'; |
| OLD | NEW |