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

Unified Diff: sky/sdk/lib/theme/theme_data.dart

Issue 1204523002: Material light and dark themes for Sky widgets (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: support accent colors 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
Index: sky/sdk/lib/theme/theme_data.dart
diff --git a/sky/sdk/lib/theme/theme_data.dart b/sky/sdk/lib/theme/theme_data.dart
index f5873978d49ff311f1c059d6dbd377a6f9021b30..af59fa78ea687453043594ed6fb86e16e0c2dca2 100644
--- a/sky/sdk/lib/theme/theme_data.dart
+++ b/sky/sdk/lib/theme/theme_data.dart
@@ -7,7 +7,26 @@ import 'dart:sky';
import 'typography.dart';
Hixie 2015/06/22 23:08:41 import this "as typography" for clarity when using
class ThemeData {
- const ThemeData({ this.text, this.color });
+
+ ThemeData.light({
+ this.primary,
+ this.accent,
Hixie 2015/06/22 23:08:41 we should either default primary and accent to som
jackson 2015/06/23 17:14:09 Done.
+ bool darkToolbar: false })
+ : toolbarText = darkToolbar ? white : black,
+ text = black,
+ backgroundColor = const Color(0xFFFAFAFA),
Hixie 2015/06/22 23:08:41 shouldn't these come from colors.dart?
+ dialogColor = const Color(0xFFFFFFFF);
+
+ ThemeData.dark({ this.primary, this.accent })
+ : toolbarText = white,
+ text = white,
+ backgroundColor = const Color(0xFF303030),
+ dialogColor = const Color(0xFF424242);
+
final TextTheme text;
- final Map<int, Color> color;
+ final TextTheme toolbarText;
+ final Map<int, Color> primary;
+ final Map<int, Color> accent;
+ final Color backgroundColor;
+ final Color dialogColor;
}

Powered by Google App Engine
This is Rietveld 408576698