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

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

Issue 1192773004: Teach Sky buttons and dialogs how to use the new Theme system (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: rebase 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 | « no previous file | sky/sdk/lib/widgets/dialog.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 7b06afc67ed08ea9eb7aae67ce1fc88ad9511408..fe6d3810d49e5216b3fc4cb9639da17f0b390281 100644
--- a/sky/sdk/lib/theme/theme_data.dart
+++ b/sky/sdk/lib/theme/theme_data.dart
@@ -7,35 +7,33 @@ import 'dart:sky';
import 'typography.dart' as typography;
import 'colors.dart' as colors;
+enum ThemeBrightness { dark, light }
+
class ThemeData {
ThemeData.light({
this.primary,
this.accent,
bool darkToolbar: false })
- : toolbarText = darkToolbar ? typography.white : typography.black,
- text = typography.black,
- backgroundColor = colors.Grey[50],
- dialogColor = colors.White;
+ : brightness = ThemeBrightness.light,
+ toolbarText = darkToolbar ? typography.white : typography.black,
+ text = typography.black;
ThemeData.dark({ this.primary, this.accent })
- : toolbarText = typography.white,
- text = typography.white,
- backgroundColor = colors.Grey[850],
- dialogColor = colors.Grey[800];
+ : brightness = ThemeBrightness.dark,
+ toolbarText = typography.white,
+ text = typography.white;
ThemeData.fallback()
- : primary = colors.Indigo,
+ : brightness = ThemeBrightness.light,
+ primary = colors.Indigo,
accent = colors.PinkAccent,
toolbarText = typography.white,
- text = typography.black,
- backgroundColor = colors.Grey[50],
- dialogColor = colors.White;
+ text = typography.black;
+ final ThemeBrightness brightness;
final Map<int, Color> primary;
final Map<int, Color> accent;
final typography.TextTheme text;
final typography.TextTheme toolbarText;
- final Color backgroundColor;
- final Color dialogColor;
}
« no previous file with comments | « no previous file | sky/sdk/lib/widgets/dialog.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698