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

Unified Diff: sky/sdk/lib/widgets/dialog.dart

Issue 1201273002: Add a confirmation dialog to stock app Settings page and style it by default (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: remove unused import 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/widgets/dialog.dart
diff --git a/sky/sdk/lib/widgets/dialog.dart b/sky/sdk/lib/widgets/dialog.dart
index 027cd0cb0e669da6f6fd80a81e07e4755823d80d..1d02339f5eb0027d4cebc383dc085833543dfa3c 100644
--- a/sky/sdk/lib/widgets/dialog.dart
+++ b/sky/sdk/lib/widgets/dialog.dart
@@ -4,6 +4,7 @@
import '../theme/colors.dart' as colors;
import 'basic.dart';
+import 'default_text_style.dart';
import 'material.dart';
import "theme.dart";
@@ -37,11 +38,25 @@ class Dialog extends Component {
List<Widget> children = new List<Widget>();
- if (title != null)
- children.add(title);
+ if (title != null) {
+ children.add(new Padding(
+ padding: new EdgeDims(24.0, 24.0, content == null ? 20.0 : 0.0, 24.0),
+ child: new DefaultTextStyle(
+ style: Theme.of(this).text.title,
+ child: title
+ )
+ ));
+ }
- if (content != null)
- children.add(content);
+ if (content != null) {
+ children.add(new Padding(
+ padding: const EdgeDims(20.0, 24.0, 24.0, 24.0),
+ child: new DefaultTextStyle(
+ style: Theme.of(this).text.subhead,
+ child: content
+ )
+ ));
+ }
if (actions != null)
children.add(actions);
@@ -52,13 +67,16 @@ class Dialog extends Component {
onGestureTap: (_) => onDismiss()
),
new Center(
- child: new ConstrainedBox(
- constraints: new BoxConstraints(minWidth: 280.0),
- child: new Material(
- level: 4,
- color: color,
- child: new ShrinkWrapWidth(
- child: new Block(children)
+ child: new Container(
+ margin: new EdgeDims.symmetric(horizontal: 40.0, vertical: 24.0),
+ child: new ConstrainedBox(
+ constraints: new BoxConstraints(minWidth: 280.0),
+ child: new Material(
+ level: 4,
+ color: color,
+ child: new ShrinkWrapWidth(
+ child: new Block(children)
+ )
)
)
)

Powered by Google App Engine
This is Rietveld 408576698