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

Side by Side Diff: sky/sdk/lib/widgets/menu_item.dart

Issue 1218153005: Refactoring to support dark theme better (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: fix import issues Created 5 years, 5 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 unified diff | Download patch
« no previous file with comments | « sky/sdk/lib/widgets/material_button.dart ('k') | sky/sdk/lib/widgets/radio.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 import '../painting/text_style.dart'; 5 import '../painting/text_style.dart';
6 import 'basic.dart'; 6 import 'basic.dart';
7 import 'button_base.dart'; 7 import 'button_base.dart';
8 import 'default_text_style.dart'; 8 import 'default_text_style.dart';
9 import 'icon.dart'; 9 import 'icon.dart';
10 import 'ink_well.dart'; 10 import 'ink_well.dart';
(...skipping 25 matching lines...) Expand all
36 void syncFields(MenuItem source) { 36 void syncFields(MenuItem source) {
37 icon = source.icon; 37 icon = source.icon;
38 children = source.children; 38 children = source.children;
39 onPressed = source.onPressed; 39 onPressed = source.onPressed;
40 super.syncFields(source); 40 super.syncFields(source);
41 } 41 }
42 42
43 TextStyle get textStyle { 43 TextStyle get textStyle {
44 TextStyle result = Theme.of(this).text.body2; 44 TextStyle result = Theme.of(this).text.body2;
45 if (highlight) 45 if (highlight)
46 result = result.copyWith(color: Theme.of(this).primary[500]); 46 result = result.copyWith(color: Theme.of(this).primaryColor);
47 return result; 47 return result;
48 } 48 }
49 49
50 Widget buildContent() { 50 Widget buildContent() {
51 return new Listener( 51 return new Listener(
52 onGestureTap: (_) { 52 onGestureTap: (_) {
53 if (onPressed != null) 53 if (onPressed != null)
54 onPressed(); 54 onPressed();
55 }, 55 },
56 child: new Container( 56 child: new Container(
(...skipping 13 matching lines...) Expand all
70 child: new Flex(children, direction: FlexDirection.horizontal) 70 child: new Flex(children, direction: FlexDirection.horizontal)
71 ) 71 )
72 ) 72 )
73 ) 73 )
74 ]) 74 ])
75 ) 75 )
76 ) 76 )
77 ); 77 );
78 } 78 }
79 } 79 }
OLDNEW
« no previous file with comments | « sky/sdk/lib/widgets/material_button.dart ('k') | sky/sdk/lib/widgets/radio.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698