Fix visual bugs in Stocks

- Center the labels on the tabs
 - Make the drawer's mask visible
This commit is contained in:
Adam Barth
2015-08-03 12:43:25 -07:00
parent 4270d8970d
commit c47a118493
2 changed files with 8 additions and 5 deletions

View File

@@ -68,8 +68,11 @@ class Drawer extends StatefulComponent {
// while dragging.
_performance.attachedForce = kDefaultSpringForce;
if (navigator != null)
navigator.pushState(this, (_) => _performance.reverse());
if (navigator != null) {
scheduleMicrotask(() {
navigator.pushState(this, (_) => _performance.reverse());
});
}
}
void syncFields(Drawer source) {
@@ -85,7 +88,8 @@ class Drawer extends StatefulComponent {
child: new ColorTransition(
performance: _performance,
direction: showing ? Direction.forward : Direction.reverse,
color: new AnimatedColorValue(colors.transparent, end: const Color(0x7F000000))
color: new AnimatedColorValue(colors.transparent, end: const Color(0x7F000000)),
child: new Container()
),
onGestureTap: handleMaskTap
);

View File

@@ -34,7 +34,6 @@ const double _kMinTabWidth = 72.0;
const double _kMaxTabWidth = 264.0;
const double _kRelativeMaxTabWidth = 56.0;
const EdgeDims _kTabLabelPadding = const EdgeDims.symmetric(horizontal: 12.0);
const TextStyle _kTabTextStyle = const TextStyle(textAlign: TextAlign.center);
const int _kTabIconSize = 24;
const double _kTabBarScrollDrag = 0.025;
const Duration _kTabBarScroll = const Duration(milliseconds: 200);
@@ -322,7 +321,7 @@ class Tab extends Component {
Widget _buildLabelText() {
assert(label.text != null);
return new Text(label.text, style: _kTabTextStyle);
return new Text(label.text);
}
Widget _buildLabelIcon() {