5944 Commits

Author SHA1 Message Date
Hans Muller
7a42fe3482 Convert Dismissable to use gestures
Convert Dismissable to use the ScrollStart, ScrollUpdate, and ScrollEnd gestures. Support for fling gestures is TBD.

Included a basic unit test that checks that one item can be dismissed with a press-drag-release gesture.

Fixed the scroll gesture recognizer: if the last pointer goes up and candidate recognizers still exist, then reject the gesture.
2015-08-31 16:44:25 -07:00
Adam Barth
bd038cfc53 Merge pull request #972 from abarth/parent_data_madness
Positioned 'remembers' things it shouldn't
2015-08-31 16:41:36 -07:00
Adam Barth
64a784141e Positioned 'remembers' things it shouldn't
This patch makes ParentDataNode less general purpose and instead teaches Flex
and Stack how to program the parent data for their children. We used to have
this general system because parent data used to carry CSS styling, but we don't
need it anymore.

Fixes #957
2015-08-31 16:41:14 -07:00
Ian Hickson
17476a68ea Merge pull request #971 from Hixie/address
Remove the silly dialog.
2015-08-31 16:11:46 -07:00
Hixie
820137b7f9 Remove the inner SizeObserver from ScrollableWidgetList.
Adds a HomogeneousViewport class that works like MixedViewport but
handles only children that have all the same height.

Converts ScrollableWidgetList to use that, so that we don't waste a
frame looking at the size of the contents each time we change size.

This allows a number of seemingly pointless double-pumps in the tests
to be removed.

Other changes that were necessary to support the above:

 - RenderBlock now supports minExtent (think 'min-height' in CSS)
 - RenderBlock now supports itemExtent (forces the height of each
   child to be the same, so that the itemExtent passed to the fixed-
   height scrollables are all authoritative instead of a source of
   bugs when they don't match)
 - RenderBlockViewport now supports horizontal scrolling
 - improved the style of the isInfinite assert in box.dart
 - fixed the position of a comment in mixed_viewport.dart
 - added a test
 - made the logic for how many items to show be more precise
2015-08-31 15:57:45 -07:00
Adam Barth
916e4fabe4 Make these constants private
These constants aren't useful outside these files and are cause noise in the
dartdoc.
2015-08-31 15:53:33 -07:00
Hixie
eae466f032 Remove the silly dialog.
Fixes #247.
2015-08-31 14:41:34 -07:00
Ian Fischer
333e611585 Merge pull request #969 from iansf/extract_install
Extract install from StartSky
2015-08-31 14:30:29 -07:00
Ian Fischer
0c089cb323 Extract install into its own sky_tool command. 2015-08-31 14:20:18 -07:00
Hans Muller
805ff3134c Merge pull request #966 from HansMuller/fix-mixed-viewport-example
Update mixed_viewport example to new Key API
2015-08-31 14:11:04 -07:00
Adam Barth
0b690583c9 Basic widgets should validate their parameters with asserts
Also fixes #937.
2015-08-31 13:34:30 -07:00
Adam Barth
fefdb92e5e Merge pull request #961 from abarth/transform_origin
Add an origin parameter to transforms
2015-08-31 13:22:01 -07:00
Adam Barth
ffc6eaa9bd Add an origin parameter to transforms
This parameter makes it easier to do math when you don't want to center your
tranform at (0, 0).
2015-08-31 13:21:26 -07:00
Hans Muller
fbe4bb42a0 Update mixed_viewport example to new Key API 2015-08-31 11:37:25 -07:00
Ian Fischer
58e013c46e Merge pull request #960 from iansf/fix_ios_deploy_crashes
Avoid crashing when an iOS device isn't connected
2015-08-31 10:43:23 -07:00
Ian Fischer
17d89f3dbb Avoid crashing when an iOS device isn’t connected. 2015-08-31 10:41:52 -07:00
Ian Hickson
1e61314ed5 Merge pull request #897 from Hixie/sync-children
Provide a fast path for MultiChildRenderObjectWrapper.syncRenderObject() when the children lists are identical.
2015-08-31 10:36:28 -07:00
Adam Barth
5fb3176951 Merge pull request #953 from abarth/painting_docs
Add dartdoc for the painting code
2015-08-31 09:37:10 -07:00
Adam Barth
e525943d81 Add dartdoc for the painting code 2015-08-31 09:36:35 -07:00
Adam Barth
528ff0f117 onPressed not called when in a Positioned Flex
We were setting the main axis extent to zero because we had a sign error.

Fixes #918
2015-08-31 09:12:40 -07:00
Adam Barth
ff74d9ec19 Unbreak link when deployed 2015-08-30 18:43:17 -07:00
Ian Hickson
bbb29f229f Add gestures/ to README.md prose 2015-08-30 16:30:59 -07:00
Ian Hickson
f291588da5 Add gestures/ to README.md diagram 2015-08-30 16:29:48 -07:00
Adam Barth
35ac1f710e Add dartdoc for base 2015-08-30 13:03:03 -07:00
Adam Barth
984a39f491 Update box_painter.dart 2015-08-30 11:03:00 -07:00
Adam Barth
92ef38fd46 Merge pull request #946 from abarth/infinite_border_radius
BoxDecoration's borderRadius should be able to handle a value of double.INFINITY
2015-08-29 22:34:30 -07:00
Adam Barth
bef55951a5 Scrolls should start immediately when possible
If there are no other gestures in the arena, we should kick off the scroll
gesture right away. This change pulled a refactoring of how we dispatch events
to Widgets. Now we dispatch events to Widgets interleaved with their associated
RenderObjects. (Previously we dispatched to all of the RenderObjects first.)
2015-08-29 22:30:49 -07:00
Adam Barth
4adf70215d Pull in a new version of playfair
We need the new version because of the TextPainter rename.
2015-08-29 15:54:43 -07:00
Adam Barth
b3b4b4573f Rev pub package 2015-08-29 15:52:08 -07:00
Adam Barth
16f4f836af Update playfair after TextPainter rename 2015-08-29 11:47:18 -07:00
Adam Barth
365d2277c8 Rename ParagraphPainter to TextPainter
Also, add asserts that the text has layout before being painted.
2015-08-29 11:41:20 -07:00
Adam Barth
650c4a64f5 BoxDecoration's borderRadius should be able to handle a value of double.INIFINITY
We just need to enforce some finite clamp and Skia will do the rest.

Fixes #939
2015-08-28 20:58:34 -07:00
Adam Barth
5feb77f69f Remove unused import to make analyzer happy 2015-08-28 20:50:54 -07:00
Adam Barth
1344211bdb Merge pull request #941 from abarth/scroll_disambig
Disambiguate horizontal and vertical scrolling
2015-08-28 20:33:31 -07:00
Adam Barth
b40864c9b7 Disambiguate horizontal and vertical scrolling
We now have separate gestures for horizontal, vertical, and pan scrolling.
2015-08-28 20:33:14 -07:00
Ian Fischer
d96f385310 Merge pull request #944 from iansf/no_android
Don't crash when no Android device is attached
2015-08-28 19:28:51 -07:00
Misha Dynin
af9212c78d Fixed a typo in the README. 2015-08-28 17:54:14 -07:00
Ian Fischer
576f51d4f4 Make it so that sky_tool doesn’t crash if an Android device isn’t attached.
Refactors a bunch of Android-related things into an AndroidDevice singleton class.
2015-08-28 17:13:39 -07:00
Ian Hickson
a5d9c0cb2b Merge pull request #942 from Hixie/mixed-mid
Fix crash when a MixedViewport is initially offset at a non-zero position
2015-08-28 16:59:43 -07:00
Hixie
fc7943fe06 Test MixedViewport
add/remove/add smoketest
basic vertical behaviour
basic horizontal behaviour
2015-08-28 16:59:10 -07:00
Hixie
791bd8b546 Fix crash when a MixedViewport is initially offset at a non-zero position.
We need to always remove the widget when you sync a non-visible
widget, even if we already have it, because otherwise we'll try to
sync it with null again later, which causes a crash.

Test in #938.
2015-08-28 16:57:05 -07:00
Viktor Lidholt
2d0d82e0b0 Merge pull request #940 from vlidholt/master
Improvements to demo game
2015-08-28 16:16:51 -07:00
Adam Barth
ce2d9f374e Rev pub package 2015-08-28 16:13:02 -07:00
Viktor Lidholt
138e8fbf42 Adds power-ups to demo game 2015-08-28 16:07:00 -07:00
Viktor Lidholt
c7d2872d77 Adds new enemies and coin display to demo game 2015-08-28 16:07:00 -07:00
Hixie
eb84a0cae4 Set and remove the callbacks on the RenderObject when we create and remove it.
...and not when we mount and dismount.

Turns out that when we dismount, it's too late -- we've already set
renderObject to null.

We also mark the mixed viewport as dirty when it is removed from its parent.
Without this, we try to reuse the child nodes in subsequent syncs, which is a disaster.
2015-08-28 15:07:51 -07:00
Adam Barth
f4869c764b onScrollStart shouldn't have an offset
Instead, we pump a onScrollUpdate with the offset if there is an offset.
2015-08-28 15:07:30 -07:00
Hixie
06efe78546 Add support for 'direction' to MixedViewport. 2015-08-28 14:27:51 -07:00
Adam Barth
81b3bdd414 Merge pull request #930 from abarth/scroll
Add scroll gestures and use them in Scrollable
2015-08-28 14:05:36 -07:00
Adam Barth
e99ff36283 Add scroll gestures and use them in Scrollable
This patch replaces the scroll gestures used by Scrollable with ones detected
by the ScrollGestureDetector.
2015-08-28 13:59:46 -07:00