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

Side by Side Diff: sky/examples/raw/shadowed_box.dart

Issue 1172723002: Add a proper material shadow the popup menu (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « no previous file | sky/sdk/lib/framework/components2/popup_menu.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 import 'dart:sky'; 5 import 'dart:sky';
6 import 'package:sky/framework/app.dart'; 6 import 'package:sky/framework/app.dart';
7 import 'package:sky/framework/rendering/box.dart'; 7 import 'package:sky/framework/rendering/box.dart';
8 import 'package:sky/framework/rendering/flex.dart'; 8 import 'package:sky/framework/rendering/flex.dart';
9 import 'package:sky/framework/theme2/shadows.dart';
9 10
10 AppView app; 11 AppView app;
11 12
12 void main() { 13 void main() {
13 var coloredBox = new RenderDecoratedBox( 14 var coloredBox = new RenderDecoratedBox(
14 decoration: new BoxDecoration(backgroundColor: const Color(0xFFFFFF00)) 15 decoration: new BoxDecoration(
16 backgroundColor: const Color(0xFFFAFAFA),
17 boxShadow: Shadow[3])
15 ); 18 );
16 var shadow = const BoxShadow( 19 var paddedBox = new RenderPadding(
17 color: const Color(0xFFEEEEEE), offset: const Size(5.0, 5.0), blur: 5.0); 20 padding: const EdgeDims.all(50.0),
18 var shadowBox = new RenderShadowedBox(shadow: shadow, child: coloredBox); 21 child: coloredBox);
19 var paddedBox = new RenderPadding(padding: const EdgeDims.all(30.0), 22 app = new AppView(new RenderDecoratedBox(
20 child: shadowBox); 23 decoration: const BoxDecoration(
21 app = new AppView(paddedBox); 24 backgroundColor: const Color(0xFFFFFFFF)
25 ),
26 child: paddedBox
27 ));
22 } 28 }
OLDNEW
« no previous file with comments | « no previous file | sky/sdk/lib/framework/components2/popup_menu.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698