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

Unified Diff: sky/sdk/lib/editing/input.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/sdk/home.dart ('k') | sky/sdk/lib/theme/colors.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/sdk/lib/editing/input.dart
diff --git a/sky/sdk/lib/editing/input.dart b/sky/sdk/lib/editing/input.dart
index f86e993882ed14135ef81415111ec4f473993e8e..ad060ad898efd0e642db690f29d18b570e7434c7 100644
--- a/sky/sdk/lib/editing/input.dart
+++ b/sky/sdk/lib/editing/input.dart
@@ -68,15 +68,23 @@ class Input extends Component {
textChildren.add(child);
}
+ ThemeData themeData = Theme.of(this);
+ Color focusHighlightColor = themeData.accentColor;
+ Color cursorColor = themeData.accentColor;
+ if (themeData.primarySwatch != null) {
+ cursorColor = Theme.of(this).primarySwatch[200];
+ focusHighlightColor = focused ? themeData.primarySwatch[400] : themeData.primarySwatch[200];
+ }
+
textChildren.add(new EditableText(
value: _editableValue,
focused: focused,
style: textStyle,
- cursorColor: Theme.of(this).primary[200]
+ cursorColor: cursorColor
));
Border focusHighlight = new Border(bottom: new BorderSide(
- color: focused ? Theme.of(this).primary[400] : Theme.of(this).primary[200],
+ color: focusHighlightColor,
width: focused ? 2.0 : 1.0
));
« no previous file with comments | « sky/sdk/home.dart ('k') | sky/sdk/lib/theme/colors.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698