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

Unified Diff: sky/framework/components/menu_item.dart

Issue 993033003: Move example fn widgets into sky/framework/components (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 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/framework/components/menu_divider.dart ('k') | sky/framework/components/radio.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/framework/components/menu_item.dart
diff --git a/sky/examples/fn/widgets/menuitem.dart b/sky/framework/components/menu_item.dart
similarity index 65%
rename from sky/examples/fn/widgets/menuitem.dart
rename to sky/framework/components/menu_item.dart
index 85f8d506671ce375b2f25e75c0d395d328e16249..dc1b8dfe165e2408944aa1852648606514fe03dc 100644
--- a/sky/examples/fn/widgets/menuitem.dart
+++ b/sky/framework/components/menu_item.dart
@@ -1,8 +1,13 @@
-part of widgets;
+// 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.
-class MenuItem extends ButtonBase {
+import '../fn.dart';
+import 'button_base.dart';
+import 'icon.dart';
- static Style _style = new Style('''
+class MenuItem extends ButtonBase {
+ static final Style _style = new Style('''
transform: translateX(0);
display: flex;
align-items: center;
@@ -10,7 +15,7 @@ class MenuItem extends ButtonBase {
-webkit-user-select: none;'''
);
- static Style _highlightStyle = new Style('''
+ static final Style _highlightStyle = new Style('''
transform: translateX(0);
display: flex;
align-items: center;
@@ -19,11 +24,11 @@ class MenuItem extends ButtonBase {
-webkit-user-select: none;'''
);
- static Style _iconStyle = new Style('''
+ static final Style _iconStyle = new Style('''
padding: 0px 16px;'''
);
- static Style _labelStyle = new Style('''
+ static final Style _labelStyle = new Style('''
font-family: 'Roboto Medium', 'Helvetica';
color: #212121;
padding: 0px 16px;
@@ -37,7 +42,7 @@ class MenuItem extends ButtonBase {
Node build() {
return new Container(
- style: _highlight ? _highlightStyle : _style,
+ style: highlight ? _highlightStyle : _style,
children: [
super.build(),
new Icon(
« no previous file with comments | « sky/framework/components/menu_divider.dart ('k') | sky/framework/components/radio.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698