2992 Commits

Author SHA1 Message Date
Adam Barth
ddd58c5e23 Enforce that we get a final move to the pointer up location
Previously we asserted that we got a pointer move to the location where the
pointer up occured, but not all sources of pointer packets respect that
invariant. Specifically, on the iOS simulator, of you drag outside the window,
you'll get a stream of pointers that violates that invariant.

This patch teaches the converter to insert a PointerMoveEvent to move the
pointer to the location where the up occurs, repairing the invariant.

Fixes #1912
2016-02-16 14:58:40 -08:00
Adam Barth
6a9de1d735 Add docs for RepaintBoundary 2016-02-16 13:41:44 -08:00
Adam Barth
302640a391 Improve the sample code for createState
The previous sample code isn't a common (or recommended) pattern.
2016-02-16 11:09:23 -08:00
Adam Barth
4408c820e1 Rename AutoLayoutParams to AutoLayoutRect
This object represents a rect the auto-layout system.
2016-02-15 16:29:27 -08:00
Adam Barth
c7d71d8ab1 Simplify the AutoLayout API
This patch makes it easier to use the auto layout API:

* We no longer use operator== because that requires an ugly cast by the
  API user.
* Also, "leftEdge" is now just "left" for less verbosity.
* AutoLayoutChild not implies its key from the AutoLayoutParam object.
* We now correctly layout every child of a RenderAutoLayout object even
  if the solver doesn't flush any updates to that child.
2016-02-15 15:25:21 -08:00
Adam Barth
262dd7a63b Add support for autolayout to widgets
This patch teaches the widget framework how to use Cassowary-based
autolayout. To integrate autolayout with widgets, I had to refactor how
RenderAutoLayout worked a bit. Now RenderAutoLayout follows the same
delegate pattern we use for custom paint and custom layout.
2016-02-15 03:01:40 -08:00
Adam Barth
2bb268492c Improve checkbox animation
This patch improves the checkbox animation as suggested by the design
team. The color transition now occurs earlier in the animation and there
are fewer components to the animation.

Fixes #1614
2016-02-14 18:01:15 -08:00
Ian Hickson
aa41783ae3 Merge pull request #1877 from Hixie/onPressed-disabled
Document the onPressed/disabled behavior.
2016-02-14 13:57:42 -08:00
Ian Hickson
8ff177f832 Document the onPressed/disabled behavior.
Fixes https://github.com/flutter/flutter/issues/1331

Hopefully this will be enough to start with. If this continues to be a
point of confusion we can see about adding more documentation or
changing the API somehow.
2016-02-14 11:06:11 -08:00
Ian Hickson
86366626f0 Merge pull request #1873 from Hixie/debugFillDescription
Rename debugDescribeSettings to debugFillDescription.
2016-02-14 11:05:31 -08:00
Ian Hickson
0334a833ef Rename debugDescribeSettings to debugFillDescription.
...so that it's easier to copy/paste between the rendering and settings layers.
2016-02-13 23:23:45 -08:00
Adam Barth
4fb47600e4 Add a Velocity class to be explicit about units
We were using an Offset, which represented pixels/second, but it wasn't
clear to clients whether that was pixels/ms. Now we use a Velocity class
that is explict about the units.

Fixes #1510
Fixes #785
2016-02-13 22:59:09 -08:00
Ian Hickson
ae178800d5 Merge pull request #1870 from Hixie/image
Use Image.toString instead of rolling our own each time
2016-02-13 19:51:40 -08:00
Ian Hickson
f54b8ad510 Use Image.toString instead of rolling our own each time
I meant to check this in as part of https://github.com/flutter/flutter/pull/1852
but forgot to commit the local change, d'oh.
2016-02-13 17:54:10 -08:00
Ian Hickson
00285bf2b2 Merge pull request #1852 from Hixie/stock-icons
Fix color of icons in drawers in dark theme.
2016-02-13 17:26:10 -08:00
Ian Hickson
b3d964145f Disable flakey test.
See https://github.com/flutter/flutter/issues/1854
2016-02-13 17:11:39 -08:00
Ian Hickson
3eb1b412e0 Fix color of icons in drawers in dark theme.
This makes it match the material spec more.
https://www.google.com/design/spec/style/icons.html

Fixes https://github.com/flutter/flutter/issues/1357
2016-02-13 17:10:10 -08:00
Adam Barth
deb9d0b3a0 Remove references to dart:ui_internals
This library is being folded into dart:ui.

Fixes #83
2016-02-13 13:12:30 -08:00
Adam Barth
aa90a9f41c Update engine 2016-02-13 13:12:07 -08:00
Adam Barth
948ae15ca5 Clean up the standalone examples
Our examples have been growing organically over time. This patch cleans
them up to illustrate specific aspects of Flutter.
2016-02-13 11:00:58 -08:00
Ian Hickson
8db6f5b127 Merge pull request #1833 from Hixie/progress-nits
SawTooth
2016-02-12 19:09:17 -08:00
Ian Hickson
601089ecf1 Merge pull request #1829 from Hixie/size-obs-2
SizeObserver crusade: drawer
2016-02-12 18:15:45 -08:00
Ian Hickson
c0c2277767 Merge pull request #1849 from Hixie/drag-horiz
Horizontal and Vertical Draggables
2016-02-12 17:59:35 -08:00
Collin Jackson
6c2ab9d352 Merge pull request #1847 from collinjackson/input_key
Don’t require global keys for Input, fixes #1828
2016-02-12 17:58:08 -08:00
Hixie
e5cf7fe37f SizeObserver crusade: drawer
Drawer doesn't need a SizeObserver, since it only looks at the size
in event handlers. It can just go and probe the tree to read the size.

Also, change from using _kEdgeDragWidth to using _kWidth when figuring
out how much of the drawer to show when dragging it from the edge, since
that is more likely to match the drawer's width.
2016-02-12 17:26:52 -08:00
Ian Hickson
ca4d10d33a Merge pull request #1820 from Hixie/rainbox
Expose more debugging tools in Stocks
2016-02-12 17:21:16 -08:00
Hixie
19a2f5ef74 Horizontal and Vertical Draggables 2016-02-12 17:16:39 -08:00
Collin Jackson
d4533622e1 Don’t require global keys for Input, fixes #1828 2016-02-12 16:56:10 -08:00
Hixie
7c23ededef SawTooth 2016-02-12 14:20:37 -08:00
Hixie
334fcbbf44 Draggables were disappearing
I forgot to wrap the state changing in a setState. Oops.
2016-02-12 14:03:47 -08:00
Adam Barth
baca514f99 Merge pull request #1827 from abarth/scrollable_list_padding
Fix padding for ScrollableList
2016-02-12 13:59:59 -08:00
Adam Barth
ad2fa5a6e7 Fix padding for ScrollableList
Previously we had totally wrong behavior. Now we have more correct behavior and
testing.

Fixes #1808
2016-02-12 13:39:05 -08:00
Ian Hickson
b00773a306 Merge pull request #1803 from Hixie/canvas-crash
Reenable canvas test.
2016-02-12 12:52:55 -08:00
Hixie
fd7be69df0 SizeObserver crusade: snap alignment
Remove the SizeObserver you need to use snap alignment in lists by
having the lists provide the size themselves in the callback.

Also, remove snapAlignmentOffset since we couldn't figure out how to
explain it and it's not really needed.
2016-02-12 12:40:44 -08:00
Hixie
a95c866bf3 Expose more debugging tools in Stocks 2016-02-12 11:41:17 -08:00
Hans Muller
78b3096126 colors demo 2016-02-12 11:31:08 -08:00
Ian Hickson
f8f50ae713 Merge pull request #1804 from Hixie/progress-nits
Clean-up around progress indicators.
2016-02-12 10:53:03 -08:00
Ian Hickson
d2c3275086 Merge pull request #1791 from Hixie/custom-paint-saves
Assert that custom painters balance save/restores.
2016-02-12 09:54:34 -08:00
Hixie
2c69f2429f Clean-up around progress indicators.
Move StepTween to tween.dart.

Move _buildIndicator() methods to be next to the build() methods they're
used from, so that reading the code is easier.

Fix typos, add some comments, style nits.
2016-02-12 09:28:56 -08:00
Adam Barth
78181d82e7 Merge pull request #1798 from abarth/image_cache
ImageCache should be a public type
2016-02-12 09:08:40 -08:00
Ian Hickson
ecdd55e4cd Merge pull request #1796 from abarth/progress_nits
Fix style nits in progress_indicator.dart
2016-02-12 08:46:43 -08:00
Hixie
edac70a5dd Reenable canvas test.
I'm guessing the recent changes to the bindings fixed this crash.

Closes https://github.com/flutter/flutter/issues/248.
2016-02-12 08:39:59 -08:00
Hixie
0d1a3cfcff Assert that custom painters balance save/restores. 2016-02-12 08:35:45 -08:00
Ian Hickson
16ecfeb074 Merge pull request #1797 from Hixie/toString
toString for Tween and ThemeData
2016-02-12 07:16:53 -08:00
Adam Barth
45c4069070 ImageCache should be a public type
We expose `imageCache`, which is an ImageCache, but previously the class
was private which means there was no documentation for the methods on
that object.

Fixes #1750
2016-02-11 22:33:21 -08:00
Ian Hickson
ab3b6a6eec toString for Tween and ThemeData 2016-02-11 22:25:39 -08:00
Adam Barth
0ae02d2f95 Fix style nits in progress_indicator.dart
This patch tightens up the imports in this file and hides some more of
the implementation details by making RepeatingCurveTween and StepTween
private.

Also, removed a CurvedAnimation with a linear curve.  That's not needed
because the animation controller itself is an Animation<double>.
2016-02-11 22:20:14 -08:00
Josh Estelle
6bb7c0ae9c Implement the Material Circular Indeterminate Progress Indicator correctly to spec.
This animation expands/collapses an arc that's 3/4ths of a circle.
The next iteration begins where the previous appeared to finish.
This happens while the whole thing rotates, such that the starting point of each
expansion moves in a star-wise pattern around the circle.

See:
https://www.google.com/design/spec/components/progress-activity.html
(note: the video here demonstrating this animation is actually slightly incorrect...
we'll hopefully update it soon)
2016-02-11 22:12:15 -08:00
Ian Hickson
cd96855e50 Merge pull request #1789 from flutter/Hixie-patch-1
Ticker typedef had no defined return type
2016-02-11 17:00:16 -08:00
Adam Barth
f6f96277e8 Update engine 2016-02-11 16:58:41 -08:00