diff --git a/examples/stocks/lib/stock_row.dart b/examples/stocks/lib/stock_row.dart index 4a858b39ec8..7cf9e6fb562 100644 --- a/examples/stocks/lib/stock_row.dart +++ b/examples/stocks/lib/stock_row.dart @@ -38,29 +38,27 @@ class StockRow extends Component { ]; // TODO(hansmuller): An explicit |height| shouldn't be needed - return new InkWell( - child: new Container( - padding: const EdgeDims(16.0, 16.0, 20.0, 16.0), - height: kHeight, - decoration: new BoxDecoration( - border: new Border( - bottom: new BorderSide(color: Theme.of(this).dividerColor) - ) + return new Container( + padding: const EdgeDims(16.0, 16.0, 20.0, 16.0), + height: kHeight, + decoration: new BoxDecoration( + border: new Border( + bottom: new BorderSide(color: Theme.of(this).dividerColor) + ) + ), + child: new Flex([ + new Container( + child: new StockArrow(percentChange: stock.percentChange), + margin: const EdgeDims.only(right: 5.0) ), - child: new Flex([ - new Container( - child: new StockArrow(percentChange: stock.percentChange), - margin: const EdgeDims.only(right: 5.0) - ), - new Flexible( - child: new Flex( - children, - alignItems: FlexAlignItems.baseline, - textBaseline: DefaultTextStyle.of(this).textBaseline - ) + new Flexible( + child: new Flex( + children, + alignItems: FlexAlignItems.baseline, + textBaseline: DefaultTextStyle.of(this).textBaseline ) - ]) - ) + ) + ]) ); } } diff --git a/packages/flutter/lib/theme/theme_data.dart b/packages/flutter/lib/theme/theme_data.dart index 1a3f3e78495..015110267a3 100644 --- a/packages/flutter/lib/theme/theme_data.dart +++ b/packages/flutter/lib/theme/theme_data.dart @@ -26,8 +26,15 @@ class ThemeData { // Some users want the pre-multiplied color, others just want the opacity. hintColor = brightness == ThemeBrightness.dark ? const Color(0x42FFFFFF) : const Color(0x4C000000), hintOpacity = brightness == ThemeBrightness.dark ? 0.26 : 0.30, - highlightColor = const Color(0x66999999), - selectedColor = const Color(0x33999999), + // TODO(eseidel): Where are highlight and selected colors documented? + // I flipped highlight/selected to match the News app (which is clearly not quite Material) + // Gmail has an interesting behavior of showing selected darker until + // you click on a different drawer item when the first one loses its + // selected color and becomes lighter, the ink then fills to make the new + // click dark to match the previous (resting) selected state. States + // revert when you cancel the tap. + highlightColor = const Color(0x33999999), + selectedColor = const Color(0x66999999), text = brightness == ThemeBrightness.dark ? typography.white : typography.black { assert(brightness != null); diff --git a/packages/flutter/lib/widgets/ink_well.dart b/packages/flutter/lib/widgets/ink_well.dart index 380732848a3..eb39a0ffef3 100644 --- a/packages/flutter/lib/widgets/ink_well.dart +++ b/packages/flutter/lib/widgets/ink_well.dart @@ -13,11 +13,11 @@ import 'package:sky/rendering/object.dart'; import 'package:sky/widgets/basic.dart'; import 'package:sky/widgets/framework.dart'; -const int _kSplashInitialOpacity = 0x80; -const double _kSplashCancelledVelocity = 0.3; -const double _kSplashConfirmedVelocity = 0.3; +const int _kSplashInitialOpacity = 0x30; +const double _kSplashCancelledVelocity = 0.7; +const double _kSplashConfirmedVelocity = 0.7; const double _kSplashInitialSize = 0.0; -const double _kSplashUnconfirmedVelocity = 0.1; +const double _kSplashUnconfirmedVelocity = 0.2; double _getSplashTargetSize(Size bounds, Point position) { double d1 = (position - bounds.topLeft(Point.origin)).distance; @@ -72,7 +72,7 @@ class InkSplash { } void paint(PaintingCanvas canvas) { - int opacity = (_kSplashInitialOpacity * (1.0 - (_radius.value / _targetRadius))).floor(); + int opacity = (_kSplashInitialOpacity * (1.1 - (_radius.value / _targetRadius))).floor(); sky.Paint paint = new sky.Paint()..color = new sky.Color(opacity << 24); double radius = _pinnedRadius == null ? _radius.value : _pinnedRadius; canvas.drawCircle(position, radius, paint);