2592 Commits

Author SHA1 Message Date
Ian Hickson
2965dcb61f Cleanup for the Pointer changes. 2015-12-05 00:31:27 -08:00
Ian Hickson
f162555648 PointerInput refactor
Instead of PointerInputEvent having a "type" field, we now have a
different class for each pointer type.

This has ripple effects throughout the system.

I also did code cleanup in affected files while I was there.
2015-12-04 22:42:38 -08:00
Adam Barth
bc1b47e917 Merge pull request #755 from abarth/rm_painting_canvas
Remove PaintingCanvas
2015-12-04 21:23:49 -08:00
Adam Barth
abf0359569 Remove PaintingCanvas
We can just use Canvas now.  The two are the same thing.
2015-12-04 20:26:08 -08:00
Adam Barth
40bc9e65da Remove outdated radial_reaction.dart
We now draw radial reactions using Material.
2015-12-04 20:20:29 -08:00
Ian Hickson
b6cf053e89 Merge pull request #752 from Hixie/yak3-remove-timing
Replace AnimationTiming with CurvedPerformance
2015-12-04 18:09:58 -08:00
Hixie
379b6a50f2 Replace AnimationTiming with CurvedPerformance
Also, replace places that use the term "create performance" with
"create performance controller".
2015-12-04 17:42:09 -08:00
Hixie
21ec20e947 MeanPerformance 2015-12-04 16:57:29 -08:00
Hixie
4ba074f690 Refactor PerformanceView listeners.
Primarily, this rearranges how listeners are handled internally by the
various PerformanceView classes so that there's not so much redundancy.

It also fixes ReversePerformance and ProxyPerformance to not leak.
Previously, they never unhooked their listeners, so they'd leak until
the entire chain of performances was killed. Now, they unhook as soon as
they themselves have no listeners left, which is more idiomatic.
2015-12-04 16:10:11 -08:00
Adam Barth
0d6a564aec Merge pull request #747 from abarth/null_assert
Improve the asset for build functions that return null
2015-12-04 15:03:48 -08:00
Ian Hickson
f1b01f9a46 Merge pull request #746 from Hixie/homogeneous-fixes
Add more asserts to help catch the blackness bug
2015-12-04 14:51:24 -08:00
Adam Barth
59c3ecdcc6 Improve the asset for build functions that return null
Fixes #689
2015-12-04 14:47:51 -08:00
Hixie
d4f3d0a072 Add more asserts to help catch the blackness bug 2015-12-04 14:32:56 -08:00
Collin Jackson
c253ca627b Support for hero transitions underneath a PageRoute 2015-12-04 14:26:31 -08:00
Collin Jackson
fa31a4ad37 Move HeroController into heroes.dart and PageRoute into pages.dart 2015-12-04 13:33:18 -08:00
Hixie
a83eadccc0 Refactor forward transition building
Instead of separate functions for the 0->1 and 1->2 transitions, just
have one function.
2015-12-04 13:07:24 -08:00
Adam Barth
42eafce04a Merge pull request #740 from abarth/custom_layout_assert
MultiChildLayoutDelegate should assert that all children have had layoutChild called exactly once
2015-12-04 12:50:14 -08:00
Adam Barth
b83187d8f3 MultiChildLayoutDelegate should assert that all children have had layoutChild called exactly once
Fixes #692
Fixes #690
2015-12-04 12:31:58 -08:00
Hixie
4789ee36c3 BuilderTransition no longer requires variables
Sometimes you want to just make a transition driven straight from the
performance's progress, rather than with an explicit variable.
2015-12-04 12:10:41 -08:00
Adam Barth
eaab8fa18f Merge pull request #735 from abarth/custom_clip
Add custom clipping to ClipRect and ClipOval
2015-12-04 11:31:47 -08:00
Adam Barth
975997113b Merge pull request #734 from abarth/foreground_painter
Add the ability to custom paint foregrounds
2015-12-04 11:28:08 -08:00
Adam Barth
f66726609d Add custom clipping to ClipRect and ClipOval 2015-12-04 11:26:34 -08:00
Hixie
6c3459e0b6 Slider Improvements
Have the widget support min/max arguments to make the widget easier to
use. Also, fix the dragging so it's actually where the knob is.
2015-12-04 11:23:16 -08:00
Adam Barth
2a9de0aa97 Add the ability to custom paint foregrounds 2015-12-04 11:21:55 -08:00
Adam Barth
0608a02a97 Improve material ink response
This patch contains a number of improvements to the material ink response:

- The ink response now remains until you lift your finger
- When disappearing, the ink response now fades out
- The ink response is now the correct color (at least in the light theme)
- The ink response for IconButton now has a (circular) highlight
- The ink response for IconButton now repositions itself to be centered on the highlight

In addition, I've adjusted the various animation parameters to better match the
behavior of ink responses in the Java implementation of material.

Fixes #695
2015-12-04 00:17:12 -08:00
Ian Hickson
c5a26615d8 Introduce some basic utility classes.
One might argue, the most basic utility classes.
2015-12-03 20:03:31 -08:00
Adam Barth
2b47efc906 Merge pull request #716 from abarth/auto_menu
Automatically fill in the menu button when there's a drawer
2015-12-03 16:37:44 -08:00
Adam Barth
e17c3eccf6 Automatically fill in the menu button when there's a drawer
Also, fill in a back arrow when we can go back.

Fixes #699
2015-12-03 16:30:06 -08:00
Adam Barth
20a49edd73 Add support for letterSpacing to TextStyle 2015-12-03 16:25:46 -08:00
Ian Hickson
1ff3a359e2 Merge pull request #712 from Hixie/yak2-discriminating-transitions
Be more discerning with forward transitions
2015-12-03 16:06:46 -08:00
Hixie
5dd8bd6e34 Allow non-Material apps to use the Title widget. 2015-12-03 15:42:59 -08:00
Hixie
cd19702ce8 Be more discerning with forward transitions
So you don't fade out when going to a popup menu, for example.
2015-12-03 15:10:11 -08:00
Hixie
cf7a3b0473 Navigator.canPop(context) 2015-12-03 15:03:26 -08:00
Adam Barth
1a5639d35e Merge pull request #707 from abarth/tiny_flex
RenderFlex shouldn't assert when its out of space
2015-12-03 14:41:44 -08:00
Adam Barth
7e474f6d9c RenderFlex shouldn't assert when its out of space
Previously, we would assert with FlexJustifyContent.collapse if we ran out of
space. Now we do the same thing we do for the other types of justification,
which is to let the children's layout overflow.
2015-12-03 14:29:00 -08:00
Hixie
df07a69b12 Let MaterialApp.onGenerateRoute return a Route
Also:
 - minor code reindents in places.
 - reset the widget tree between tests.
 - once you generate a route, don't let its builder change
   (previously it would keep changing as the routes table changed).
 - revert the stocks app toolbar-fading-on-forward-transition thing.
2015-12-03 14:21:38 -08:00
Adam Barth
1d195cb995 Fix a large number of Drawer bugs
This patch restructures how we handle drawer. The drawer is now a child of the
Scaffold, which wraps the Drawer in a DrawerController. The DrawerController
manages the interaction with the navigator as well as the edge swiping. The
DrawerController's state machine is driven almost entirely off its Performance,
which it now owns completely.

Fixes #90
Fixes #187
Fixes #192
Fixes #194
Fixes #604
2015-12-03 10:12:56 -08:00
Hixie
bc5307f5af buildForwardTransition()
For those times when you want to do something as you move away from a
route into the next one, as well as when you move into it from the
previous one.
2015-12-02 17:16:43 -08:00
Florian Loitsch
728211526a Rename some of the functions from the scheduler.
The names are probably less familiar, but more consistent:
- FrameCallback: a callback that is relative to the frame and wants the
  frame offset (a duration) as argument.
- addXFrameCallback: adds the given callback to the internal lists/maps.
- scheduleXFrameCallback (currently only X = ""): add the callback, but
  also trigger a new frame.
- handleX: the method that is invoked when the event-loop or the frame
  calls into the scheduler.
- ensureXYZ: ensure that the callback happens.
  Unfortunately there is the ambiguity between a "callback": it can be a
  closure, or the action of doing a callback, so we end up with:
  ensureBeginFrameCallback, and ensureEventLoopCallback, where
  "callback" means the action of being called back.
2015-12-02 15:37:11 -08:00
Adam Barth
43bf82a8b8 Merge pull request #683 from abarth/mimic_overlay
Add liftToOverlay to Mimicable
2015-12-02 14:29:06 -08:00
Adam Barth
f538d3b750 Add liftToOverlay to Mimicable
This patch integrates Mimicable with Overlay such that you can tell a Mimicable
to lift up into the overlay and animate towards another widget identified by a
global key.
2015-12-02 14:20:56 -08:00
Hans Muller
2c016459b0 Merge pull request #682 from HansMuller/progress_indicator
Fix a typo in _CircularProgressIndicatorPainter
2015-12-02 12:08:59 -08:00
Hans Muller
46f57d2d57 Fix a typo in _CircularProgressIndicatorPainter 2015-12-02 11:47:10 -08:00
Adam Barth
853c42fc08 Merge pull request #677 from abarth/behavior
Rename _updateScrollBehaviour to _updateScrollBehavior
2015-12-02 10:20:29 -08:00
Adam Barth
4f43a782c8 Rename _updateScrollBehaviour to _updateScrollBehavior
Fixes #675
2015-12-02 09:51:09 -08:00
Ian Hickson
d5e072c35b Fix crash when going back in stocks app.
Heroes with the same tag have to have keys that are unique across the
entire subtree. Since we can now show both stock lists, this means we
have to include the tab in the heroes' keys.

Fixes #668.
2015-12-01 22:54:11 -08:00
Florian Loitsch
018bcbf2d9 Remove animation scheduler. 2015-12-01 20:36:52 -08:00
Florian Loitsch
43e1dc9db4 Merge pull request #662 from floitschG/scheduler.merge_schedulers
Merge the two schedulers.
2015-12-01 19:41:17 -08:00
Florian Loitsch
10c80f2e1a Merge the two schedulers. 2015-12-01 17:48:38 -08:00
Jason Simmons
79fd04de1a Initialize the track color fields in _RenderSwitch 2015-12-01 16:39:38 -08:00