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

Unified Diff: sky/sdk/lib/widgets/popup_menu_item.dart

Issue 1217573003: Fix all the components to pick the right colours from the theme. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: 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/widgets/menu_item.dart ('k') | sky/tests/examples/sector-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/sdk/lib/widgets/popup_menu_item.dart
diff --git a/sky/sdk/lib/widgets/popup_menu_item.dart b/sky/sdk/lib/widgets/popup_menu_item.dart
index 1a183b1b50c9cbef250237668de3127406930309..42c0ce40ad602595fbd0c8623c87914ff8b626c5 100644
--- a/sky/sdk/lib/widgets/popup_menu_item.dart
+++ b/sky/sdk/lib/widgets/popup_menu_item.dart
@@ -2,8 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+import '../painting/text_style.dart';
import 'basic.dart';
+import 'default_text_style.dart';
import 'ink_well.dart';
+import 'theme.dart';
class PopupMenuItem extends Component {
PopupMenuItem({ String key, this.child, this.opacity}) : super(key: key);
@@ -11,6 +14,8 @@ class PopupMenuItem extends Component {
final Widget child;
final double opacity;
+ TextStyle get textStyle => Theme.of(this).text.subhead;
+
Widget build() {
return new Opacity(
opacity: opacity,
@@ -18,7 +23,10 @@ class PopupMenuItem extends Component {
child: new Container(
constraints: const BoxConstraints(minWidth: 112.0),
padding: const EdgeDims.all(16.0),
- child: child
+ child: new DefaultTextStyle(
+ style: textStyle,
+ child: child
+ )
)
)
);
« no previous file with comments | « sky/sdk/lib/widgets/menu_item.dart ('k') | sky/tests/examples/sector-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698