1703 Commits

Author SHA1 Message Date
Hixie
438f209088 SizeObserver crusade: ScrollableMixedWidgetListState 2016-02-26 18:40:05 -08:00
Ian Hickson
f6bd20ff64 Merge pull request #2241 from Hixie/size-obs-8
SizeObserver crusade: Mimcable
2016-02-26 16:57:17 -08:00
Hans Muller
0dd7285d4e Merge pull request #2239 from HansMuller/icon
Disabled IconButtons render correctly
2016-02-26 16:52:14 -08:00
Hixie
157ac75248 SizeObserver crusade: Mimcable 2016-02-26 16:48:46 -08:00
Adam Barth
fc564f0c44 Merge pull request #2238 from abarth/rm_animation_direction
Remove AnimationDirection
2016-02-26 16:46:53 -08:00
Ian Hickson
d998edd366 Merge pull request #2236 from Hixie/raw-gesture-detector-assert
Fix crash in Block.
2016-02-26 16:41:15 -08:00
Adam Barth
6f7ceff048 Merge pull request #2235 from abarth/animation_status
Elide fewer AnimationStatus callbacks
2016-02-26 16:36:04 -08:00
Hans Muller
faf55dda79 Disabled IconButtons render correctly 2016-02-26 16:33:05 -08:00
Adam Barth
3bbeee7b54 Remove AnimationDirection
This concept is now private to AnimationController. All the clients actually
want the AnimationStatus.
2016-02-26 16:32:42 -08:00
Adam Barth
25ab5555b7 Elide fewer AnimationStatus callbacks
Previously we would elide forward and reverse callbacks that canceled each
other out, which broke the expected state machine. Now we synchronously deliver
status callbacks when start an animation.

Fixes #1913
2016-02-26 16:29:14 -08:00
Hans Muller
8cb9ef70fa tabs 2016-02-26 16:03:05 -08:00
Hixie
fcb3071936 Fix crash in Block.
This assert was overzealous. You can update a RawGestureDetector any
time before the semantics phase, it doesn't have to only be during your
child's layout.

This is good because Block has additional PointerListeners between its
GestureDetector and its Viewport.
2016-02-26 15:56:40 -08:00
Ian Hickson
13b8777f89 Merge pull request #2230 from Hixie/size-obs-7
SizeObserver crusade: Heroes
2016-02-26 15:47:39 -08:00
Adam Barth
6ecbd548c4 Merge pull request #2227 from abarth/scroll_events
Scrollable's callbacks should follow a state machine
2016-02-26 14:47:53 -08:00
Adam Barth
c629006748 Scrollable's callbacks should follow a state machine
Now onScroll callbacks are always bracketed by onScrollStart and onScrollEnd
callbacks.

Fixes #1822
2016-02-26 14:39:50 -08:00
Ian Hickson
0f92316bea Merge pull request #2223 from Hixie/size-obs-6
SizeObserver crusade: Remove EnterExitTransition
2016-02-26 14:26:29 -08:00
Hans Muller
8edeecbcd0 Merge pull request #2216 from HansMuller/stocks_demo
Add CheckedPopupMenuitem, update the Stocks demo
2016-02-26 14:04:56 -08:00
Hixie
8f2ef23736 SizeObserver crusade: Heroes
Somehow this actually made heroes way simpler.
2016-02-26 13:56:55 -08:00
Adam Barth
11fa94cd6b Simplify demo template
We don't need these keys. Also, improve style in several places.

Fixes #2225
2016-02-26 13:42:25 -08:00
Hans Muller
3d377305f4 updated per review feedback 2016-02-26 13:13:46 -08:00
Hixie
f7d493b65b SizeObserver crusade: Remove EnterExitTransition
...and friends.
2016-02-26 12:55:52 -08:00
Hans Muller
179d41e68f Add CheckedPopupMenuitem, update the Stocks demo 2016-02-26 11:27:44 -08:00
Hixie
be865e1e1a SizeObserver crusade: RawInputLine 2016-02-26 10:17:47 -08:00
Hans Muller
f1df2bd7c0 Gallery Menu Demo etc 2016-02-25 16:16:44 -08:00
Hixie
a78d2c9e8b SizeObserver crusade: Dismissable
Refactor Dismissable to not need a SizeObserver and to generally tighten
up the code a bit.
2016-02-25 14:02:49 -08:00
Hixie
f808055756 Remove size observers from scrollables.
Also:
 - add operator==/hashCode/toString to ViewportDimensions
 - add toString to BindingBase
 - add toString and debugFillDescription to ScrollBehavior
 - fix a bug in the RawGestureDetectorState's replaceGestureRecognizers
 - rename MixedViewport's onExtentsUpdate to onExtentChanged
 - replace ExtentsUpdateCallback with ValueChanged<double>
 - remove a microtask for dispatching scroll start, since it
   did not appear to have any purpose
 - added dartdocs to Instrumentation until I understood it
 - made all event dispatch in Instrumentation drain microtasks
2016-02-25 10:55:12 -08:00
Andrew Wilson
203415771e And inverted and reversed curves. 2016-02-25 10:28:43 -08:00
Adam Barth
4b1a9ff14c Remove PointerRouter and GestureArena arguments
There's no reason to make clients supply a PointerRounter and a
GestureArena when constructing gesture recognizers. These objects are
statics and the gesture recognizers can just grab them directly.

Also, remove the callback constructor arguments. Almost no code used
them. Instead, people seem to prefer using the `..` operator to set
callbacks on the recognizers. Removing the arguments removes a bunch of
boilerplate.
2016-02-24 22:23:00 -08:00
Adam Barth
9d4e0e8551 Merge pull request #2142 from abarth/interactive_text
Add the ability to recognize gestures on text spans
2016-02-24 17:32:30 -08:00
Hixie
512b2e1972 Fix move() to call markNeedsLayout().
Otherwise, changing the order of your children (e.g. shuffling a list of
children) will have no visible effect.
2016-02-24 17:10:59 -08:00
Adam Barth
8e326d724a Add the ability to recognize gestures on text spans
Currently the interface for recognizing gestures on text spans is pretty ugly,
but hopefully we can improve it with time.

Fixes #156
2016-02-24 17:07:35 -08:00
Adam Barth
62609669d8 Merge pull request #2141 from abarth/text_span_equals
Fix TextSpan's operator==
2016-02-24 17:04:45 -08:00
Adam Barth
25219277f6 Fix TextSpan's operator==
We forgot to compare the lengths of the lists.
2016-02-24 16:53:22 -08:00
Hixie
0df3730d3e Just-in-time mutations of GestureDetector
This allows us to adjust exactly which gestures we're listening for
during layout, which I'll use to kill a SizeObserver.
2016-02-24 16:18:05 -08:00
Eric Seidel
fbe4cdf5c6 Merge pull request #2129 from eseidelGoogle/space_per_flex
Don't give children negative sizes when overconstrained
2016-02-24 15:30:16 -08:00
Eric Seidel
4e7a9de578 Fix two bugs in Flex exposed by the Game in landscape mode
One bug was masking the other, hence they both needed to be fixed
and tested separately.

@Hixie
2016-02-24 15:30:05 -08:00
Adam Barth
fb4dbf4584 Improve TextSpan
Now we just have one TextSpan class that handles both simple strings, trees of
children, and styling both. This approach simplifies the interface for most
clients.

This patch also removes StyledText, which was weakly typed and tricky to use
correctly. The replacement is RichText, which is strongly typed and uses
TextSpan.
2016-02-24 14:07:10 -08:00
Adam Barth
9e45b85e72 Keep AnimationController's _value in bounds
Rather than clamping _value on read, we now clamp the value when writing it,
which simplifies reasoning about _value.
2016-02-24 12:15:57 -08:00
Hans Muller
25e22f5648 List Gallery Demo 2016-02-23 15:24:41 -08:00
Hixie
16e7c3a61c Trivial cleanup of getDistanceToBaseline
Turns out we don't need 'parent' outside the assert at all.
2016-02-23 12:56:07 -08:00
Hixie
98d47c3544 Clean up scroll behaviour.
This makes ScrollBehavior agnostic about the kind of scroll.
This also means ExtentScrollBehavior's comment about being linear is
more relevant (previously it was true of all scroll behaviours).
2016-02-23 11:56:37 -08:00
Ian Hickson
7b0e7ee38e Some trivial animation library cleanup. 2016-02-22 14:18:17 -08:00
Adam Barth
2c2fa23886 Remove ThemeData.primarySwatch
In the dark theme, there isn't really a primary swatch, so this API was
a sandtrap. Instead, be explicit about the colors we need for various
widgets in the theme.

Fixes #1277
2016-02-21 20:28:32 -08:00
Adam Barth
aeb9419122 Merge pull request #2064 from abarth/snackbar_action
SnackBar should have a single optional action
2016-02-21 12:58:24 -08:00
Adam Barth
505547ae95 Merge pull request #2068 from abarth/de_material
Remove redundant material_ prefix
2016-02-21 12:58:13 -08:00
Adam Barth
240df79361 Remove redundant material_ prefix
These files are already in the "material" folder. They don't need to be
prefixed with material again.

Fixes #702
2016-02-20 22:12:15 -08:00
Adam Barth
6722e3d516 Animation status callbacks should be re-entrant
We should mutate the status of the AnimationController before calling
the status callbacks so that we're prepared to be re-entered.

Fixes #1911
2016-02-20 22:06:00 -08:00
Adam Barth
72fcbb7d36 SnackBar should have a single optional action
The example in the spec with multiple actions is an anti-example.

Fixes #1876
2016-02-20 16:54:10 -08:00
Hans Muller
f989d3b855 Tooltip gallery demo 2016-02-19 08:27:16 -08:00
Adam Barth
09dbd9e76d Remove ServiceRegistry
We don't need this anymore now that we have Mozart. The engine recently
stopped support it also.
2016-02-18 20:01:10 -08:00