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

Unified Diff: sky/framework/fn.dart

Issue 1003553002: Update Button to be made of Material (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 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/framework/editing/editable_text.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/framework/fn.dart
diff --git a/sky/framework/fn.dart b/sky/framework/fn.dart
index 73d13547325c5c22dcfff870c8632e187183c7f4..0dc59513893fdc06f316427cbf42bb8969e49626 100644
--- a/sky/framework/fn.dart
+++ b/sky/framework/fn.dart
@@ -135,17 +135,22 @@ abstract class Element extends Node {
String inlineStyle;
List<Node> _children = null;
- String _className = '';
+ String _class = '';
Element({
Object key,
List<Node> children,
- Style style,
+ List<Style> styles,
this.inlineStyle
}) : super(key:key) {
+ _class = '';
rafaelw 2015/03/11 21:17:15 bit: _class = styles == null ? '' : styles.map((s
abarth-chromium 2015/03/11 21:20:05 Done.
+ if (styles != null) {
+ for (Style style in styles) {
+ _class += ' ' + style._className;
+ }
+ }
- _className = style == null ? '': style._className;
_children = children == null ? _emptyList : children;
if (_isInCheckedMode) {
@@ -229,8 +234,8 @@ abstract class Element extends Node {
_syncEvents(old);
sky.Element root = _root as sky.Element;
- if (_className != old._className) {
- root.setAttribute('class', _className);
+ if (_class != old._class) {
+ root.setAttribute('class', _class);
}
if (inlineStyle != old.inlineStyle) {
@@ -413,12 +418,12 @@ class Container extends Element {
Container({
Object key,
List<Node> children,
- Style style,
+ List<Style> styles,
String inlineStyle
}) : super(
key: key,
children: children,
- style: style,
+ styles: styles,
inlineStyle: inlineStyle
);
}
@@ -437,7 +442,7 @@ class Image extends Element {
Image({
Object key,
List<Node> children,
- Style style,
+ List<Style> styles,
String inlineStyle,
this.width,
this.height,
@@ -445,7 +450,7 @@ class Image extends Element {
}) : super(
key: key,
children: children,
- style: style,
+ styles: styles,
inlineStyle: inlineStyle
);
@@ -481,7 +486,7 @@ class Anchor extends Element {
Anchor({
Object key,
List<Node> children,
- Style style,
+ List<Style> styles,
String inlineStyle,
this.width,
this.height,
@@ -489,7 +494,7 @@ class Anchor extends Element {
}) : super(
key: key,
children: children,
- style: style,
+ styles: styles,
inlineStyle: inlineStyle
);
« no previous file with comments | « sky/framework/editing/editable_text.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698