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

Unified Diff: sky/sdk/lib/painting/text_style.dart

Issue 1204523002: Material light and dark themes for Sky widgets (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: fix analyzer warning properly 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/painting/text_style.dart
diff --git a/sky/sdk/lib/painting/text_style.dart b/sky/sdk/lib/painting/text_style.dart
index 19d3c547e0447c9560d92de91ce36220cb91490f..943aab71054f0da3c0465320dd96525b54045d41 100644
--- a/sky/sdk/lib/painting/text_style.dart
+++ b/sky/sdk/lib/painting/text_style.dart
@@ -74,10 +74,11 @@ class TextStyle {
TextStyle copyWith({
Color color,
+ String fontFamily,
double fontSize,
FontWeight fontWeight,
TextAlign textAlign,
- TextDecoration decoration,
+ List<TextDecoration> decoration,
Color decorationColor,
TextDecorationStyle decorationStyle
}) {
@@ -97,6 +98,19 @@ class TextStyle {
return 'rgba(${color.red}, ${color.green}, ${color.blue}, ${color.alpha / 255.0})';
}
+ TextStyle merge(TextStyle other) {
+ return copyWith(
+ color: other.color,
+ fontFamily: other.fontFamily,
+ fontSize: other.fontSize,
+ fontWeight: other.fontWeight,
+ textAlign: other.textAlign,
+ decoration: other.decoration,
+ decorationColor: other.decorationColor,
+ decorationStyle: other.decorationStyle
+ );
+ }
+
static String _fontFamilyToCSSString(String fontFamily) {
// TODO(hansmuller): escape the fontFamily string.
return fontFamily;
« no previous file with comments | « sky/sdk/BUILD.gn ('k') | sky/sdk/lib/theme/colors.dart » ('j') | sky/sdk/lib/widgets/theme.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698