OLD | NEW |
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 '../fn.dart'; | 5 import '../fn.dart'; |
6 import 'button_base.dart'; | 6 import 'button_base.dart'; |
7 import 'icon.dart'; | 7 import 'icon.dart'; |
8 import 'ink_well.dart'; | 8 import 'ink_well.dart'; |
9 | 9 |
10 class MenuItem extends ButtonBase { | 10 class MenuItem extends ButtonBase { |
11 static final Style _style = new Style(''' | 11 static final Style _style = new Style(''' |
12 transform: translateX(0); | 12 transform: translateX(0); |
13 display: flex; | 13 display: flex; |
| 14 flex-direction: row; |
14 align-items: center; | 15 align-items: center; |
15 height: 48px; | 16 height: 48px; |
16 -webkit-user-select: none;''' | 17 -webkit-user-select: none;''' |
17 ); | 18 ); |
18 | 19 |
19 static final Style _highlightStyle = new Style(''' | 20 static final Style _highlightStyle = new Style(''' |
20 transform: translateX(0); | 21 transform: translateX(0); |
21 display: flex; | 22 display: flex; |
| 23 flex-direction: row; |
22 align-items: center; | 24 align-items: center; |
23 height: 48px; | 25 height: 48px; |
24 background: rgba(153, 153, 153, 0.4); | 26 background: rgba(153, 153, 153, 0.4); |
25 -webkit-user-select: none;''' | 27 -webkit-user-select: none;''' |
26 ); | 28 ); |
27 | 29 |
28 static final Style _iconStyle = new Style(''' | 30 static final Style _iconStyle = new Style(''' |
29 padding: 0px 16px;''' | 31 padding: 0px 16px;''' |
30 ); | 32 ); |
31 | 33 |
(...skipping 21 matching lines...) Expand all Loading... |
53 new Container( | 55 new Container( |
54 style: _labelStyle, | 56 style: _labelStyle, |
55 children: children | 57 children: children |
56 ) | 58 ) |
57 ] | 59 ] |
58 ), | 60 ), |
59 highlight ? _highlightStyle : _style | 61 highlight ? _highlightStyle : _style |
60 ); | 62 ); |
61 } | 63 } |
62 } | 64 } |
OLD | NEW |