Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
sxychenjing
engine
提交
2d149ca3
E
engine
项目概览
sxychenjing
/
engine
与 Fork 源项目一致
从无法访问的项目Fork
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
E
engine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
2d149ca3
编写于
7月 21, 2015
作者:
H
Hixie
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Make typography.white and typography.black constants.
上级
f65711af
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
33 addition
and
24 deletion
+33
-24
sky/sdk/lib/theme/theme_data.dart
sky/sdk/lib/theme/theme_data.dart
+2
-2
sky/sdk/lib/theme/typography.dart
sky/sdk/lib/theme/typography.dart
+31
-22
未找到文件。
sky/sdk/lib/theme/theme_data.dart
浏览文件 @
2d149ca3
...
...
@@ -16,8 +16,8 @@ class ThemeData {
Map
<
int
,
Color
>
primarySwatch
,
Color
accentColor
,
this
.
accentColorBrightness
:
ThemeBrightness
.
dark
,
typography
.
TextTheme
text
})
:
this
.
brightness
=
brightness
,
typography
.
TextTheme
text
})
:
this
.
brightness
=
brightness
,
this
.
primarySwatch
=
primarySwatch
,
primaryColorBrightness
=
primarySwatch
==
null
?
brightness
:
ThemeBrightness
.
dark
,
canvasColor
=
brightness
==
ThemeBrightness
.
dark
?
colors
.
Grey
[
850
]
:
colors
.
Grey
[
50
],
...
...
sky/sdk/lib/theme/typography.dart
浏览文件 @
2d149ca3
...
...
@@ -12,18 +12,34 @@ import 'package:sky/painting/text_style.dart';
// TODO(jackson): Baseline should be language relative!
// These values are for English-like text.
class
TextTheme
{
TextTheme
.
_
(
Color
color54
,
Color
color87
)
:
display4
=
new
TextStyle
(
fontSize:
112.0
,
fontWeight:
FontWeight
.
w100
,
color:
color54
,
textBaseline:
TextBaseline
.
alphabetic
),
display3
=
new
TextStyle
(
fontSize:
56.0
,
fontWeight:
FontWeight
.
w400
,
color:
color54
,
textBaseline:
TextBaseline
.
alphabetic
),
display2
=
new
TextStyle
(
fontSize:
45.0
,
fontWeight:
FontWeight
.
w400
,
color:
color54
,
height:
48.0
/
45.0
,
textBaseline:
TextBaseline
.
alphabetic
),
display1
=
new
TextStyle
(
fontSize:
34.0
,
fontWeight:
FontWeight
.
w400
,
color:
color54
,
height:
40.0
/
34.0
,
textBaseline:
TextBaseline
.
alphabetic
),
headline
=
new
TextStyle
(
fontSize:
24.0
,
fontWeight:
FontWeight
.
w400
,
color:
color87
,
height:
32.0
/
24.0
,
textBaseline:
TextBaseline
.
alphabetic
),
title
=
new
TextStyle
(
fontSize:
20.0
,
fontWeight:
FontWeight
.
w500
,
color:
color87
,
height:
28.0
/
20.0
,
textBaseline:
TextBaseline
.
alphabetic
),
subhead
=
new
TextStyle
(
fontSize:
16.0
,
fontWeight:
FontWeight
.
w400
,
color:
color87
,
height:
24.0
/
16.0
,
textBaseline:
TextBaseline
.
alphabetic
),
body2
=
new
TextStyle
(
fontSize:
14.0
,
fontWeight:
FontWeight
.
w500
,
color:
color87
,
height:
24.0
/
14.0
,
textBaseline:
TextBaseline
.
alphabetic
),
body1
=
new
TextStyle
(
fontSize:
14.0
,
fontWeight:
FontWeight
.
w400
,
color:
color87
,
height:
20.0
/
14.0
,
textBaseline:
TextBaseline
.
alphabetic
),
caption
=
new
TextStyle
(
fontSize:
12.0
,
fontWeight:
FontWeight
.
w400
,
color:
color54
,
textBaseline:
TextBaseline
.
alphabetic
),
button
=
new
TextStyle
(
fontSize:
14.0
,
fontWeight:
FontWeight
.
w500
,
color:
color87
,
textBaseline:
TextBaseline
.
alphabetic
);
// The two colours used here are 54% and 87%, respectively, of the base color (black or white)
const
TextTheme
.
_black
()
:
display4
=
const
TextStyle
(
fontSize:
112.0
,
fontWeight:
FontWeight
.
w100
,
color:
const
Color
(
0xFF757575
),
textBaseline:
TextBaseline
.
alphabetic
),
display3
=
const
TextStyle
(
fontSize:
56.0
,
fontWeight:
FontWeight
.
w400
,
color:
const
Color
(
0xFF757575
),
textBaseline:
TextBaseline
.
alphabetic
),
display2
=
const
TextStyle
(
fontSize:
45.0
,
fontWeight:
FontWeight
.
w400
,
color:
const
Color
(
0xFF757575
),
height:
48.0
/
45.0
,
textBaseline:
TextBaseline
.
alphabetic
),
display1
=
const
TextStyle
(
fontSize:
34.0
,
fontWeight:
FontWeight
.
w400
,
color:
const
Color
(
0xFF757575
),
height:
40.0
/
34.0
,
textBaseline:
TextBaseline
.
alphabetic
),
headline
=
const
TextStyle
(
fontSize:
24.0
,
fontWeight:
FontWeight
.
w400
,
color:
const
Color
(
0xFF212121
),
height:
32.0
/
24.0
,
textBaseline:
TextBaseline
.
alphabetic
),
title
=
const
TextStyle
(
fontSize:
20.0
,
fontWeight:
FontWeight
.
w500
,
color:
const
Color
(
0xFF212121
),
height:
28.0
/
20.0
,
textBaseline:
TextBaseline
.
alphabetic
),
subhead
=
const
TextStyle
(
fontSize:
16.0
,
fontWeight:
FontWeight
.
w400
,
color:
const
Color
(
0xFF212121
),
height:
24.0
/
16.0
,
textBaseline:
TextBaseline
.
alphabetic
),
body2
=
const
TextStyle
(
fontSize:
14.0
,
fontWeight:
FontWeight
.
w500
,
color:
const
Color
(
0xFF212121
),
height:
24.0
/
14.0
,
textBaseline:
TextBaseline
.
alphabetic
),
body1
=
const
TextStyle
(
fontSize:
14.0
,
fontWeight:
FontWeight
.
w400
,
color:
const
Color
(
0xFF212121
),
height:
20.0
/
14.0
,
textBaseline:
TextBaseline
.
alphabetic
),
caption
=
const
TextStyle
(
fontSize:
12.0
,
fontWeight:
FontWeight
.
w400
,
color:
const
Color
(
0xFF757575
),
textBaseline:
TextBaseline
.
alphabetic
),
button
=
const
TextStyle
(
fontSize:
14.0
,
fontWeight:
FontWeight
.
w500
,
color:
const
Color
(
0xFF212121
),
textBaseline:
TextBaseline
.
alphabetic
);
const
TextTheme
.
_white
()
:
display4
=
const
TextStyle
(
fontSize:
112.0
,
fontWeight:
FontWeight
.
w100
,
color:
const
Color
(
0xFF8A8A8A
),
textBaseline:
TextBaseline
.
alphabetic
),
display3
=
const
TextStyle
(
fontSize:
56.0
,
fontWeight:
FontWeight
.
w400
,
color:
const
Color
(
0xFF8A8A8A
),
textBaseline:
TextBaseline
.
alphabetic
),
display2
=
const
TextStyle
(
fontSize:
45.0
,
fontWeight:
FontWeight
.
w400
,
color:
const
Color
(
0xFF8A8A8A
),
height:
48.0
/
45.0
,
textBaseline:
TextBaseline
.
alphabetic
),
display1
=
const
TextStyle
(
fontSize:
34.0
,
fontWeight:
FontWeight
.
w400
,
color:
const
Color
(
0xFF8A8A8A
),
height:
40.0
/
34.0
,
textBaseline:
TextBaseline
.
alphabetic
),
headline
=
const
TextStyle
(
fontSize:
24.0
,
fontWeight:
FontWeight
.
w400
,
color:
const
Color
(
0xFFDEDEDE
),
height:
32.0
/
24.0
,
textBaseline:
TextBaseline
.
alphabetic
),
title
=
const
TextStyle
(
fontSize:
20.0
,
fontWeight:
FontWeight
.
w500
,
color:
const
Color
(
0xFFDEDEDE
),
height:
28.0
/
20.0
,
textBaseline:
TextBaseline
.
alphabetic
),
subhead
=
const
TextStyle
(
fontSize:
16.0
,
fontWeight:
FontWeight
.
w400
,
color:
const
Color
(
0xFFDEDEDE
),
height:
24.0
/
16.0
,
textBaseline:
TextBaseline
.
alphabetic
),
body2
=
const
TextStyle
(
fontSize:
14.0
,
fontWeight:
FontWeight
.
w500
,
color:
const
Color
(
0xFFDEDEDE
),
height:
24.0
/
14.0
,
textBaseline:
TextBaseline
.
alphabetic
),
body1
=
const
TextStyle
(
fontSize:
14.0
,
fontWeight:
FontWeight
.
w400
,
color:
const
Color
(
0xFFDEDEDE
),
height:
20.0
/
14.0
,
textBaseline:
TextBaseline
.
alphabetic
),
caption
=
const
TextStyle
(
fontSize:
12.0
,
fontWeight:
FontWeight
.
w400
,
color:
const
Color
(
0xFF8A8A8A
),
textBaseline:
TextBaseline
.
alphabetic
),
button
=
const
TextStyle
(
fontSize:
14.0
,
fontWeight:
FontWeight
.
w500
,
color:
const
Color
(
0xFFDEDEDE
),
textBaseline:
TextBaseline
.
alphabetic
);
final
TextStyle
display4
;
final
TextStyle
display3
;
...
...
@@ -36,19 +52,12 @@ class TextTheme {
final
TextStyle
body1
;
final
TextStyle
caption
;
final
TextStyle
button
;
}
final
TextTheme
black
=
new
TextTheme
.
_
(
const
Color
(
0xFF757575
),
const
Color
(
0xFF212121
)
);
}
final
TextTheme
white
=
new
TextTheme
.
_
(
const
Color
(
0xFF8A8A8A
),
const
Color
(
0xFFDEDEDE
)
);
const
TextTheme
black
=
const
TextTheme
.
_black
();
const
TextTheme
white
=
const
TextTheme
.
_white
();
// TODO(abarth): Maybe this should be hard-coded in Scaffold?
const
String
typeface
=
'font-family: sans-serif'
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录