Chromium Code Reviews| 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 'basic.dart'; | 5 import 'basic.dart'; |
| 6 import 'theme.dart'; | |
| 6 | 7 |
| 7 class MenuDivider extends Component { | 8 class MenuDivider extends Component { |
| 8 MenuDivider({ String key }) : super(key: key); | 9 MenuDivider({ String key }) : super(key: key); |
| 9 | 10 |
| 11 Color get color { | |
| 12 switch(Theme.of(this).brightness) { | |
| 13 case ThemeBrightness.light: | |
| 14 return const Color.fromARGB(31, 0, 0, 0); | |
| 15 case ThemeBrightness.dark: | |
| 16 return const Color.fromARGB(31, 255, 255, 255); | |
|
abarth-chromium
2015/07/07 00:31:35
Do these values come from somewhere? Should they
jackson
2015/07/07 00:59:20
Done.
| |
| 17 } | |
| 18 } | |
| 19 | |
| 10 Widget build() { | 20 Widget build() { |
| 11 return new Container( | 21 return new Container( |
| 12 height: 0.0, | 22 height: 0.0, |
| 13 decoration: const BoxDecoration( | 23 decoration: new BoxDecoration( |
| 14 border: const Border( | 24 border: new Border( |
| 15 bottom: const BorderSide( | 25 bottom: new BorderSide( |
| 16 color: const Color.fromARGB(31, 0, 0, 0) | 26 color: color |
| 17 ) | 27 ) |
| 18 ) | 28 ) |
| 19 ), | 29 ), |
| 20 margin: const EdgeDims.symmetric(vertical: 8.0) | 30 margin: const EdgeDims.symmetric(vertical: 8.0) |
| 21 ); | 31 ); |
| 22 } | 32 } |
| 23 } | 33 } |
| OLD | NEW |