| Index: sky/sdk/lib/widgets/tool_bar.dart
|
| diff --git a/sky/sdk/lib/widgets/tool_bar.dart b/sky/sdk/lib/widgets/tool_bar.dart
|
| index cdc251ff07f4102250aefda9f3f20a72643d1a8b..c1762169358c174b304b27cc33ca17b5dc38ca3a 100644
|
| --- a/sky/sdk/lib/widgets/tool_bar.dart
|
| +++ b/sky/sdk/lib/widgets/tool_bar.dart
|
| @@ -4,11 +4,14 @@
|
|
|
| import 'package:sky/widgets/theme.dart';
|
|
|
| +import '../painting/text_style.dart';
|
| import '../rendering/flex.dart';
|
| import '../theme/shadows.dart';
|
| +import '../theme/typography.dart' as typography;
|
| import '../theme/view_configuration.dart';
|
| import 'basic.dart';
|
| import 'default_text_style.dart';
|
| +import 'icon.dart';
|
|
|
| class ToolBar extends Component {
|
|
|
| @@ -26,6 +29,18 @@ class ToolBar extends Component {
|
| final Color backgroundColor;
|
|
|
| Widget build() {
|
| + Color toolbarColor = backgroundColor;
|
| + IconThemeColor iconThemeColor = IconThemeColor.white;
|
| + TextStyle defaultTextStyle = typography.white.title;
|
| + if (toolbarColor == null) {
|
| + ThemeData themeData = Theme.of(this);
|
| + toolbarColor = themeData.primaryColor;
|
| + if (themeData.primaryColorBrightness == ThemeBrightness.light) {
|
| + iconThemeColor = IconThemeColor.black;
|
| + defaultTextStyle = typography.black.title;
|
| + }
|
| + }
|
| +
|
| List<Widget> children = new List<Widget>();
|
| if (left != null)
|
| children.add(left);
|
| @@ -35,7 +50,7 @@ class ToolBar extends Component {
|
| new Flexible(
|
| child: new Padding(
|
| child: new DefaultTextStyle(
|
| - style: Theme.of(this).toolbarText.title,
|
| + style: defaultTextStyle,
|
| child: center
|
| ),
|
| padding: new EdgeDims.only(left: 24.0)
|
| @@ -48,13 +63,16 @@ class ToolBar extends Component {
|
| children.addAll(right);
|
|
|
| return new Container(
|
| - child: new Flex(
|
| - [new Container(child: new Flex(children), height: kToolBarHeight)],
|
| - alignItems: FlexAlignItems.flexEnd
|
| + child: new IconTheme(
|
| + data: new IconThemeData(color: iconThemeColor),
|
| + child: new Flex(
|
| + [new Container(child: new Flex(children), height: kToolBarHeight)],
|
| + alignItems: FlexAlignItems.flexEnd
|
| + )
|
| ),
|
| padding: new EdgeDims.symmetric(horizontal: 8.0),
|
| decoration: new BoxDecoration(
|
| - backgroundColor: backgroundColor == null ? Theme.of(this).primaryColor : backgroundColor,
|
| + backgroundColor: toolbarColor,
|
| boxShadow: shadows[2]
|
| )
|
| );
|
|
|