提交 c20a7f9c 编写于 作者: H Hixie

[Effen] Rename Action Bar to Tool Bar.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1133353008
上级 3acb930b
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:sky/framework/components/action_bar.dart';
import 'package:sky/framework/components/tool_bar.dart';
import 'package:sky/framework/components/drawer.dart';
import 'package:sky/framework/components/drawer_header.dart';
import 'package:sky/framework/components/floating_action_button.dart';
......@@ -31,7 +31,7 @@ enum StockMode { Optimistic, Pessimistic }
class StocksApp extends App {
static final Style _actionBarStyle = new Style('''
static final Style _toolBarStyle = new Style('''
background-color: ${Purple[500]};''');
static final Style _searchBarStyle = new Style('''
......@@ -163,9 +163,9 @@ class StocksApp extends App {
);
}
UINode buildActionBar() {
UINode buildToolBar() {
return new StyleNode(
new ActionBar(
new ToolBar(
left: new IconButton(
icon: 'navigation/menu_white',
onGestureTap: _drawerController.toggle),
......@@ -180,13 +180,13 @@ class StocksApp extends App {
icon: 'navigation/more_vert_white',
onGestureTap: _handleMenuShow)
]),
_actionBarStyle);
_toolBarStyle);
}
// TODO(abarth): Should we factor this into a SearchBar in the framework?
UINode buildSearchBar() {
return new StyleNode(
new ActionBar(
new ToolBar(
left: new IconButton(
icon: 'navigation/arrow_back_grey600',
onGestureTap: _handleSearchEnd),
......@@ -214,7 +214,7 @@ class StocksApp extends App {
addMenuToOverlays(overlays);
return new Scaffold(
header: _isSearching ? buildSearchBar() : buildActionBar(),
header: _isSearching ? buildSearchBar() : buildToolBar(),
content: new Stocklist(stocks: _stocks, query: _searchQuery),
fab: new FloatingActionButton(
content: new Icon(type: 'content/add_white', size: 24), level: 3),
......
......@@ -18,7 +18,6 @@ dart_pkg("sdk") {
"lib/framework/animation/generators.dart",
"lib/framework/animation/mechanics.dart",
"lib/framework/animation/scroll_behavior.dart",
"lib/framework/components/action_bar.dart",
"lib/framework/components/animated_component.dart",
"lib/framework/components/button.dart",
"lib/framework/components/button_base.dart",
......@@ -41,6 +40,7 @@ dart_pkg("sdk") {
"lib/framework/components/radio.dart",
"lib/framework/components/scaffold.dart",
"lib/framework/components/scrollable.dart",
"lib/framework/components/tool_bar.dart",
"lib/framework/debug/shake-to-reload.sky",
"lib/framework/debug/tracing.dart",
"lib/framework/editing/editable_string.dart",
......
......@@ -7,7 +7,7 @@ import '../layout.dart';
import '../theme/view_configuration.dart';
import 'material.dart';
class ActionBar extends Component {
class ToolBar extends Component {
static final Style _style = new Style('''
align-items: center;
height: 56px;
......@@ -24,7 +24,7 @@ class ActionBar extends Component {
UINode center;
List<UINode> right;
ActionBar({
ToolBar({
String key,
this.left,
this.center,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册