1904 Commits

Author SHA1 Message Date
Hixie
d45bf1457c HomogeneousViewport support for Theme.of()
Previously, RenderObjectElements didn't support being marked dirty. This
is fine, except for MixedViewport and HomogeneousViewport, which have
builder functions to which they hand themselves as a BuildContext. If
those builder functions call, e.g., Theme.of(), then when the theme
changes, the Inherited logic tries to tell the RenderObjectElement
object that its dependencies changed and that doesn't go down well.

This patch fixes this by making RenderObjectElement a BuildableElement,
and making MixedViewport and HomogeneousViewport hook into that to
rebuild themselves appropriately.

Also, this was only found at all because ThemeData didn't implement
operator==, so we were aggressively marking the entire tree dirty all
the time. That's fixed here too.

Also, I changed card_collection.dart to have more features to make this
easier to test. This found bugs #1524, #1522, #1528, #1529, #1530, #1531.
2015-10-07 15:53:50 -07:00
Viktor Lidholt
020e749291 Fixes typo in sprite physics 2015-10-07 14:05:11 -07:00
Viktor Lidholt
c363133da3 Adds support for applying forces and impulses to sprite physics 2015-10-07 13:26:36 -07:00
Adam Barth
3eaefd812e Merge pull request #1518 from abarth/performance_route
Separate Route and PerformanceRoute
2015-10-07 13:08:33 -07:00
Chinmay Garde
9f8b53f47a Document StatisticsOverlay.rasterizerThreshold 2015-10-07 11:47:30 -07:00
Chinmay Garde
73dce01e87 Allow updating the rasterizer tracing threshold from Dart 2015-10-07 11:22:51 -07:00
Adam Barth
30d16e2426 Separate Route and PerformanceRoute
This patch prepares us to create routes that control their performances more
closely.
2015-10-07 09:58:01 -07:00
Mehmet Akin
90d47520fd Make checkbox widget to fit more closely to material design standard. Make changes to remove animation artefacts. 2015-10-07 01:01:54 +02:00
Hans Muller
cf17dd9687 Merge pull request #1509 from HansMuller/remove_popup_menu_margin
Remove PopupMenu margin

The margins make using showMenu's menuPosition argument difficult and they're not really needed.

I also made a few small gratuitous changes in navigator.dart.
2015-10-06 11:03:23 -07:00
Hans Muller
56d9d85f2a Remove PopupMenu margin
The margins make using showMenu's menuPosition argument difficult and they're not really needed.

I also made a few small gratuitous changes in navigator.dart.
2015-10-06 10:55:31 -07:00
Adam Barth
66c6ce3794 Merge pull request #1507 from abarth/image_decoding
NetworkImage occasionally does not grab the image
2015-10-06 10:51:21 -07:00
Viktor Lidholt
ebaa45c788 Merge pull request #1508 from vlidholt/master
Improvements to sprite physics
2015-10-06 10:44:47 -07:00
Viktor Lidholt
b6e12ca9aa Forwards physics body properties to box2d in sprite physics 2015-10-06 10:39:26 -07:00
Adam Barth
8b1effc544 NetworkImage occasionally does not grab the image
I haven't been able to reproduce this bug consistently, but my theory is that
the ImageDecoder was being garbage collected before it called its completion
callback. This patch prevents that by keeping a reference to the image decoder
while the callback is in flight.

Fixes #801
2015-10-06 10:37:55 -07:00
Adam Barth
2d0d1645be Merge pull request #1503 from abarth/simplify_scaffold
Simplify Scaffold
2015-10-06 10:09:35 -07:00
Adam Barth
932626aad1 Merge pull request #1504 from abarth/tab_shadow
ToolBar with a TabBar shouldn't have a shadow
2015-10-06 10:08:11 -07:00
Adam Barth
89a09822bf Simplify Scaffold
Rather than using a custom render object, we can just use a Stack.
2015-10-06 10:06:17 -07:00
Viktor Lidholt
5ac4d1ea28 Adds forwarding of properties to box2d in sprite physics 2015-10-06 09:59:16 -07:00
Viktor Lidholt
a07cb95ec2 Merge pull request #1506 from vlidholt/master
Fixes to demo game
2015-10-06 09:57:21 -07:00
Adam Barth
ee0c01c54c Merge pull request #1501 from abarth/initial_page
PageableList should take initialPage instead of initialScrollOffset
2015-10-06 09:51:35 -07:00
Adam Barth
7f6346789f Rev pub package 2015-10-06 09:51:00 -07:00
Adam Barth
6c30e01bef Make MimicableState public again
This state object has a public API.
2015-10-06 09:33:33 -07:00
Viktor Lidholt
018cef6160 Adds default text style 2015-10-06 09:28:05 -07:00
Adam Barth
6cf105fe3e ToolBar with a TabBar shouldn't have a shadow
This patch makes the level of the ToolBar configurable. I've also cleaned up
the Tab code slightly.

For some reason, there's still a hairline between the ToolBar and the TabBar.
We might need to rethink how we draw the background a bit here.

Fixes #1454
2015-10-05 23:41:14 -07:00
Adam Barth
922aece1d5 Mark most State subclasses private
In the vast majority of cases, folks should be interacting with the Widget
rather than its State.

Fixes #267
2015-10-05 21:54:33 -07:00
Adam Barth
7ac6ab6fc7 PageableList should take initialPage instead of initialScrollOffset
Fixes #900
2015-10-05 21:36:23 -07:00
Adam Barth
330af86bdc Delete AnimatedComponent
This class has no clients.
2015-10-05 17:35:51 -07:00
Ian Hickson
012c5d94a1 Merge pull request #1496 from Hixie/focus
Fix Focus
2015-10-05 17:32:52 -07:00
Adam Barth
5a359dce9f Merge pull request #1484 from abarth/snackbar_route
Use Navigator to drive SnackBar
2015-10-05 17:32:47 -07:00
Adam Barth
706b272eaf Create the Performance for a Route earlier
Instead of waiting until build(), we now create the performance for a route in
its constructor.
2015-10-05 17:20:08 -07:00
Adam Barth
2eec30111a Use Navigator to drive SnackBar
Now SnackBar is an ephemeral route that uses a Placeholder to put itself into
the Scaffold.

Fixes #673
2015-10-05 17:12:50 -07:00
Hixie
fbf8174c87 Fix Focus
Focus.at() and company should be on Focus, not FocusState.

_notifyDescendants() was using the wrong runtimeType.

Let InheritedWidget update the descendants during build.

When you setState() during build, assert that you're not
markNeedsBuild()ing someone who isn't a descendant.

Typo in Widget.toString().
2015-10-05 16:41:50 -07:00
Viktor Lidholt
ff3e636635 Makes physics bodies fixture elements settable 2015-10-05 16:13:32 -07:00
Ian Hickson
48142d6872 Merge pull request #1490 from Hixie/navigator-ensure-pop
Handle a route being dismissed before being popped
2015-10-05 13:59:59 -07:00
Ian Hickson
4913c4fc7d Merge pull request #1489 from Hixie/cleanup
Add more debugging information to Widgets.
2015-10-05 13:59:56 -07:00
Hixie
90a0f6300f Simplify the usage of Navigator's routes argument
(These are changes cherry-picked from in-flight branches since they are
more independent and could be helpful even without those changes.)

- Change RouteBuilder's signature to take a single argument in which the
  other fields are placed, so that we can keep iterating on those
  arguments without having to break compatibility each time. Also, this
  makes defining route builders much simpler (only one argument to
  ignore rather than a variable number).

- Expose the next performance to RouteBuilders, since sometimes the
  route itself might not be where it's used.

- Allow BuildContext to be used to walk children, just like it can for
  ancestors

- Allow BuildContext to be used to get the Widget of the current
  BuildContext

- Allow StatefulComponentElement to be referenced with a type
  specialisation so that you don't have to cast when you know what the
  type you're dealing with actually is.
2015-10-05 13:59:30 -07:00
Viktor Lidholt
3fb3ec5a43 Merge pull request #1492 from vlidholt/master
Handle removal of sprite physics bodies during the physics simulation
2015-10-05 13:51:55 -07:00
Viktor Lidholt
ab104c809d Handle removal of sprite physics bodies during the physics simulation 2015-10-05 13:47:51 -07:00
Hixie
290ed842b2 Handle a route being dismissed before being popped
Ensure that if a route's performance is dismissed before the route is
popped, that we pop the route.
2015-10-05 13:38:07 -07:00
Hixie
f5834c9abe Add more debugging information to Widgets.
Also, fix comment mentioning syncConstructorArguments.
2015-10-05 13:18:06 -07:00
Adam Barth
02535f50c1 Merge pull request #1487 from abarth/merge_curve_into_interval
Give Interval a Curve to apply between start and end
2015-10-05 12:43:44 -07:00
Adam Barth
3a31f5f772 Give Interval a Curve to apply between start and end
This patch simplifies AnimationTiming and all the AnimatedValue base classes.
Also, make PopupMenu a stateless component because it has no state.

Fixes #1168
2015-10-05 12:10:48 -07:00
Viktor Lidholt
20ef160a2b Merge pull request #1486 from vlidholt/master
Prevents sprite update methods to be called before the sprite box has…
2015-10-05 11:58:09 -07:00
Viktor Lidholt
071201a5bb Prevents sprite update methods to be called before the sprite box has been property intialized 2015-10-05 11:24:59 -07:00
Adam Barth
da685ec28a Merge pull request #1485 from abarth/animation_renames
Improves names of animation classes
2015-10-05 10:57:07 -07:00
Adam Barth
3f82552d22 Improves names of animation classes
Fixes #1170
2015-10-05 10:51:43 -07:00
Chinmay Garde
850df83eeb Merge pull request #1462 from chinmaygarde/master
Allow displaying compositor statistics via a widget
2015-10-05 10:31:38 -07:00
Chinmay Garde
3e916982c4 Allow displaying compositor statistics via a widget
Example:
  import 'package:sky/widgets.dart';
  void main() => runApp(new Center(child:
      new StatisticsOverlay.allEnabled()));
2015-10-05 10:30:19 -07:00
Adam Barth
bc9d004cf0 Merge pull request #1483 from abarth/drawer_fail
Convert Drawer to using navigator
2015-10-05 10:27:53 -07:00
Adam Barth
041cd88d14 Merge pull request #1480 from abarth/rm_animated_simulation
Remove AnimatedSimulation
2015-10-05 10:24:44 -07:00