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

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

Issue 1218153005: Refactoring to support dark theme better (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: fix import issues 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/lib/widgets/raised_button.dart ('k') | sky/sdk/lib/widgets/switch.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/sdk/lib/widgets/scrollable.dart
diff --git a/sky/sdk/lib/widgets/scrollable.dart b/sky/sdk/lib/widgets/scrollable.dart
index 3e9c924880dcf2d0fc2b32bff14f0f0d83cafe67..a6c4023a356507f47251fd4354077a9ef3b1ee9c 100644
--- a/sky/sdk/lib/widgets/scrollable.dart
+++ b/sky/sdk/lib/widgets/scrollable.dart
@@ -8,12 +8,9 @@ import 'dart:sky' as sky;
import '../animation/generators.dart';
import '../animation/mechanics.dart';
import '../animation/scroll_behavior.dart';
-import '../theme/colors.dart' as colors;
-import '../theme/theme_data.dart';
import '../theme/view_configuration.dart' as config;
import 'basic.dart';
import 'material.dart';
-import 'theme.dart';
const double _kMillisecondsPerSecond = 1000.0;
@@ -37,17 +34,6 @@ abstract class Scrollable extends Component {
backgroundColor = source.backgroundColor;
}
- Color get _nonNullBackgroundColor {
- if (backgroundColor != null)
- return backgroundColor;
- switch (Theme.of(this).brightness) {
- case ThemeBrightness.light:
- return colors.Grey[50];
- case ThemeBrightness.dark:
- return colors.Grey[850];
- }
- }
-
double _scrollOffset = 0.0;
double get scrollOffset => _scrollOffset;
@@ -66,9 +52,9 @@ abstract class Scrollable extends Component {
Widget build() {
return new Listener(
child: new Material(
+ type: MaterialType.canvas,
child: buildContent(),
- edge: MaterialEdge.canvas,
- color: _nonNullBackgroundColor
+ color: backgroundColor
),
onPointerDown: _handlePointerDown,
onPointerUp: _handlePointerUpOrCancel,
« no previous file with comments | « sky/sdk/lib/widgets/raised_button.dart ('k') | sky/sdk/lib/widgets/switch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698