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

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

Issue 1217293003: Remove Material's opinion about background colours, since in fact the background colour varies dram… (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/flat_button.dart ('k') | sky/sdk/lib/widgets/scrollable.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/sdk/lib/widgets/material.dart
diff --git a/sky/sdk/lib/widgets/material.dart b/sky/sdk/lib/widgets/material.dart
index 527e055bde83a96951d3e262e55f0aa86ed23c13..793fe9606634c5353c7cf89ba16f87298c9c5ad5 100644
--- a/sky/sdk/lib/widgets/material.dart
+++ b/sky/sdk/lib/widgets/material.dart
@@ -3,7 +3,6 @@
// found in the LICENSE file.
import '../painting/box_painter.dart';
-import '../theme/colors.dart' as colors;
import '../theme/edges.dart';
import '../theme/shadows.dart';
import 'basic.dart';
@@ -27,17 +26,6 @@ class Material extends Component {
final MaterialEdge edge;
final Color color;
- Color get backgroundColor {
- if (color != null)
- return color;
- switch (Theme.of(this).brightness) {
- case ThemeBrightness.light:
- return colors.Grey[50];
- case ThemeBrightness.dark:
- return colors.Grey[850];
- }
- }
-
// TODO(ianh): we should make this animate level changes and color changes
Widget build() {
@@ -45,7 +33,7 @@ class Material extends Component {
decoration: new BoxDecoration(
boxShadow: shadows[level],
borderRadius: edges[edge],
- backgroundColor: backgroundColor,
+ backgroundColor: color,
shape: edge == MaterialEdge.circle ? Shape.circle : Shape.rectangle
),
child: new DefaultTextStyle(style: Theme.of(this).text.body1, child: child)
« no previous file with comments | « sky/sdk/lib/widgets/flat_button.dart ('k') | sky/sdk/lib/widgets/scrollable.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698