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

Side by Side Diff: sky/framework/components/popup_menu.dart

Issue 1015253002: Default box-sizing to border-box (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 unified diff | Download patch
« no previous file with comments | « sky/engine/core/rendering/style/RenderStyle.h ('k') | no next file » | 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 '../animation/animated_value.dart'; 5 import '../animation/animated_value.dart';
6 import '../fn.dart'; 6 import '../fn.dart';
7 import '../theme/colors.dart'; 7 import '../theme/colors.dart';
8 import '../theme/view-configuration.dart'; 8 import '../theme/view-configuration.dart';
9 import 'dart:math' as math; 9 import 'dart:math' as math;
10 import 'dart:sky' as sky; 10 import 'dart:sky' as sky;
(...skipping 18 matching lines...) Expand all
29 // TODO(abarth): We shouldn't mark the menu as closed until the animation 29 // TODO(abarth): We shouldn't mark the menu as closed until the animation
30 // completes. 30 // completes.
31 isOpen = false; 31 isOpen = false;
32 } 32 }
33 } 33 }
34 34
35 class PopupMenu extends Component { 35 class PopupMenu extends Component {
36 static final Style _style = new Style(''' 36 static final Style _style = new Style('''
37 border-radius: 2px; 37 border-radius: 2px;
38 padding: 8px 0; 38 padding: 8px 0;
39 box-sizing: border-box;
40 background-color: ${Grey[50]};''' 39 background-color: ${Grey[50]};'''
41 ); 40 );
42 41
43 List<List<Node>> items; 42 List<List<Node>> items;
44 int level; 43 int level;
45 PopupMenuController controller; 44 PopupMenuController controller;
46 45
47 AnimatedValueListener _position; 46 AnimatedValueListener _position;
48 List<AnimatedValue> _opacities; 47 List<AnimatedValue> _opacities;
49 int _width; 48 int _width;
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 } 102 }
104 103
105 return new Material( 104 return new Material(
106 style: _style, 105 style: _style,
107 inlineStyle: _inlineStyle(), 106 inlineStyle: _inlineStyle(),
108 children: children, 107 children: children,
109 level: level 108 level: level
110 ); 109 );
111 } 110 }
112 } 111 }
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/style/RenderStyle.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698