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

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

Issue 1212343011: improve divider appearance in dark mode (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 5 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
« no previous file with comments | « sky/sdk/example/stocks/lib/stock_row.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/sdk/lib/widgets/menu_divider.dart
diff --git a/sky/sdk/lib/widgets/menu_divider.dart b/sky/sdk/lib/widgets/menu_divider.dart
index 040ed9da63b9a09524f7fcefad0a83559677c2a3..35cb2ff35b46481b0d6d7e57099d80d2dc2b4c8c 100644
--- a/sky/sdk/lib/widgets/menu_divider.dart
+++ b/sky/sdk/lib/widgets/menu_divider.dart
@@ -3,17 +3,27 @@
// found in the LICENSE file.
import 'basic.dart';
+import 'theme.dart';
class MenuDivider extends Component {
MenuDivider({ String key }) : super(key: key);
+ Color get color {
+ switch(Theme.of(this).brightness) {
+ case ThemeBrightness.light:
+ return const Color.fromARGB(31, 0, 0, 0);
+ case ThemeBrightness.dark:
+ 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.
+ }
+ }
+
Widget build() {
return new Container(
height: 0.0,
- decoration: const BoxDecoration(
- border: const Border(
- bottom: const BorderSide(
- color: const Color.fromARGB(31, 0, 0, 0)
+ decoration: new BoxDecoration(
+ border: new Border(
+ bottom: new BorderSide(
+ color: color
)
)
),
« no previous file with comments | « sky/sdk/example/stocks/lib/stock_row.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698