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

Unified Diff: sky/sdk/example/stocks/lib/stock_row.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 | « no previous file | sky/sdk/lib/widgets/menu_divider.dart » ('j') | sky/sdk/lib/widgets/menu_divider.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/sdk/example/stocks/lib/stock_row.dart
diff --git a/sky/sdk/example/stocks/lib/stock_row.dart b/sky/sdk/example/stocks/lib/stock_row.dart
index b909731df64d1c377952324169780f0dd1707f99..ae45f223ba9ca72cf26b2a836f29328a344a1e06 100644
--- a/sky/sdk/example/stocks/lib/stock_row.dart
+++ b/sky/sdk/example/stocks/lib/stock_row.dart
@@ -19,6 +19,15 @@ class StockRow extends Component {
static const double kHeight = 79.0;
+ Color get dividerColor {
+ 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);
+ }
+ }
+
Widget build() {
String lastSale = "\$${stock.lastSale.toStringAsFixed(2)}";
@@ -53,9 +62,9 @@ class StockRow extends Component {
child: new Container(
padding: const EdgeDims(16.0, 16.0, 20.0, 16.0),
height: kHeight,
- decoration: const BoxDecoration(
- border: const Border(
- bottom: const BorderSide(color: const Color(0xFFF4F4F4))
+ decoration: new BoxDecoration(
+ border: new Border(
+ bottom: new BorderSide(color: dividerColor)
)
),
child: new Flex(children)
« no previous file with comments | « no previous file | sky/sdk/lib/widgets/menu_divider.dart » ('j') | sky/sdk/lib/widgets/menu_divider.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698