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

Side by Side Diff: sky/sdk/lib/widgets/raised_button.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/radio.dart ('k') | sky/sdk/lib/widgets/scrollable.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 '../theme/colors.dart' as colors; 5 import '../theme/colors.dart' as colors;
6 import 'basic.dart'; 6 import 'basic.dart';
7 import 'material_button.dart'; 7 import 'material_button.dart';
8 import 'theme.dart'; 8 import 'theme.dart';
9 9
10 class RaisedButton extends MaterialButton { 10 class RaisedButton extends MaterialButton {
(...skipping 12 matching lines...) Expand all
23 if (enabled) { 23 if (enabled) {
24 switch (Theme.of(this).brightness) { 24 switch (Theme.of(this).brightness) {
25 case ThemeBrightness.light: 25 case ThemeBrightness.light:
26 if (highlight) 26 if (highlight)
27 return colors.Grey[350]; 27 return colors.Grey[350];
28 else 28 else
29 return colors.Grey[300]; 29 return colors.Grey[300];
30 break; 30 break;
31 case ThemeBrightness.dark: 31 case ThemeBrightness.dark:
32 if (highlight) 32 if (highlight)
33 return Theme.of(this).primary[700]; 33 return Theme.of(this).primarySwatch[700];
34 else 34 else
35 return Theme.of(this).primary[600]; 35 return Theme.of(this).primarySwatch[600];
36 break; 36 break;
37 } 37 }
38 } else { 38 } else {
39 return colors.Grey[350]; 39 return colors.Grey[350];
40 } 40 }
41 } 41 }
42 42
43 int get level => enabled ? (highlight ? 2 : 1) : 0; 43 int get level => enabled ? (highlight ? 2 : 1) : 0;
44 } 44 }
OLDNEW
« no previous file with comments | « sky/sdk/lib/widgets/radio.dart ('k') | sky/sdk/lib/widgets/scrollable.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698