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

Unified Diff: sky/framework/components/popup_menu.dart

Issue 1037673002: Disentangle Material and InkSplash (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/components/material.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/framework/components/popup_menu.dart
diff --git a/sky/framework/components/popup_menu.dart b/sky/framework/components/popup_menu.dart
index d5a2e89939dda14362d64406fcc37e4f873e2b38..9b42bc50a68a1b52e543c9cb553ca14678b38226 100644
--- a/sky/framework/components/popup_menu.dart
+++ b/sky/framework/components/popup_menu.dart
@@ -14,7 +14,8 @@ import 'material.dart';
import 'popup_menu_item.dart';
const double _kMenuOpenDuration = 300.0;
-const double _kMenuCloneDuration = 200.0;
+const double _kMenuCloseDuration = 200.0;
+const double _kMenuCloseDelay = 100.0;
class PopupMenuController {
bool isOpen = false;
@@ -26,7 +27,8 @@ class PopupMenuController {
}
Future close() {
- return position.animateTo(0.0, _kMenuCloneDuration).then((_) {
+ return position.animateTo(0.0, _kMenuCloseDuration,
+ initialDelay: _kMenuCloseDelay).then((_) {
isOpen = false;
});
}
@@ -87,11 +89,12 @@ class PopupMenu extends AnimatedComponent {
return new PopupMenuItem(key: i++, children: item, opacity: opacity);
}));
- return new StyleNode(
- new Material(
+ return new Material(
+ content: new Container(
+ style: _style,
inlineStyle: _inlineStyle(),
- children: children,
- level: level),
- _style);
+ children: children
+ ),
+ level: level);
}
}
« no previous file with comments | « sky/framework/components/material.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698