Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(476)

Unified Diff: sky/sdk/lib/framework/widgets/menu_item.dart

Issue 1177383006: Rename all the things (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: fix imports Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/sdk/lib/framework/widgets/menu_divider.dart ('k') | sky/sdk/lib/framework/widgets/modal_overlay.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/sdk/lib/framework/widgets/menu_item.dart
diff --git a/sky/sdk/lib/framework/widgets/menu_item.dart b/sky/sdk/lib/framework/widgets/menu_item.dart
deleted file mode 100644
index b835bfc6445dd1fed58bad2e4ad762c030ab3e39..0000000000000000000000000000000000000000
--- a/sky/sdk/lib/framework/widgets/menu_item.dart
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-import 'button_base.dart';
-import 'icon.dart';
-import 'ink_well.dart';
-import 'ui_node.dart';
-import 'basic.dart';
-
-const BoxDecoration _kHighlightDecoration = const BoxDecoration(
- backgroundColor: const Color.fromARGB(102, 153, 153, 153)
-);
-
-// TODO(abarth): We shouldn't need _kHighlightBoring, but currently Container
-// isn't smart enough to retain the components it builds when we
-// add or remove a |decoration|. For now, we use a transparent
-// decoration to avoid changing the structure of the tree. The
-// right fix, however, is to make Container smarter about how it
-// syncs its subcomponents.
-const BoxDecoration _kHighlightBoring = const BoxDecoration(
- backgroundColor: const Color.fromARGB(0, 0, 0, 0)
-);
-
-class MenuItem extends ButtonBase {
- MenuItem({ Object key, this.icon, this.children, this.onGestureTap }) : super(key: key);
-
- String icon;
- List<UINode> children;
- GestureEventListener onGestureTap;
-
- void syncFields(MenuItem source) {
- icon = source.icon;
- children = source.children;
- onGestureTap = source.onGestureTap;
- super.syncFields(source);
- }
-
- UINode buildContent() {
- return new EventListenerNode(
- new Container(
- child: new InkWell(
- child: new Flex([
- new Padding(
- child: new Icon(type: "${icon}_grey600", size: 24),
- padding: const EdgeDims.symmetric(horizontal: 16.0)
- ),
- new FlexExpandingChild(
- new Padding(
- child: new Flex(children, direction: FlexDirection.horizontal),
- padding: const EdgeDims.symmetric(horizontal: 16.0)
- ),
- flex: 1
- )
- ])
- ),
- height: 48.0,
- decoration: highlight ? _kHighlightDecoration : _kHighlightBoring
- ),
- onGestureTap: onGestureTap
- );
- }
-}
« no previous file with comments | « sky/sdk/lib/framework/widgets/menu_divider.dart ('k') | sky/sdk/lib/framework/widgets/modal_overlay.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698