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

Unified Diff: sky/sdk/lib/rendering/box.dart

Issue 1217623002: Support for background images on cards, style demo home (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 | « sky/sdk/lib/painting/box_painter.dart ('k') | sky/sdk/lib/widgets/basic.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/sdk/lib/rendering/box.dart
diff --git a/sky/sdk/lib/rendering/box.dart b/sky/sdk/lib/rendering/box.dart
index fe7a9c66393a57bccc0d0a938b8b3431ea5196ae..36a3e12f94c49b7a576c1bcaa500619786435d06 100644
--- a/sky/sdk/lib/rendering/box.dart
+++ b/sky/sdk/lib/rendering/box.dart
@@ -966,6 +966,10 @@ class RenderDecoratedBox extends RenderProxyBox {
BoxDecoration get decoration => _painter.decoration;
void set decoration (BoxDecoration value) {
assert(value != null);
+ if (_painter.decoration.backgroundImage != null)
+ _painter.decoration.backgroundImage.removeChangeListener(markNeedsPaint);
+ if (value.backgroundImage != null)
+ value.backgroundImage.addChangeListener(markNeedsPaint);
if (value == _painter.decoration)
return;
_painter.decoration = value;
« no previous file with comments | « sky/sdk/lib/painting/box_painter.dart ('k') | sky/sdk/lib/widgets/basic.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698