Commit Graph

82 Commits

Author SHA1 Message Date
Kris Giesing
d4cc315cc4 Update example to use ImageInfo 2016-02-01 14:04:15 -08:00
Hixie
28a1788371 Semantics 2016-01-27 10:04:49 -08:00
Ian Hickson
aa701d44f6 Merge pull request #1257 from Hixie/shadows
More elaborate RenderBox example
2016-01-18 13:53:22 -08:00
Ian Hickson
9d155bdce5 Merge pull request #1285 from Hixie/activity
Activity clean-up
2016-01-17 22:33:59 -08:00
Ian Hickson
51566aeffa More elaborate RenderBox example
Also, some trivial fixes for things that I found while playing with
the rendering library directly.
2016-01-17 22:31:41 -08:00
Ian Hickson
96958b203e Merge pull request #1255 from Hixie/random-fixes
Include BoxDecoration description in Container toString
2016-01-17 22:30:19 -08:00
Ian Hickson
c03c4cca10 Activity clean-up
Turns out Android crashes if the colour is not opaque, so we enforce
that at the Dart level.

Also, since label and colour are both actually optional, make them
named arguments.
2016-01-16 12:18:32 -08:00
Hixie
df78ec2b24 fix framework to match new mojo sdk
The dart bindings changed semantics in a non-compatible way.
2016-01-15 17:05:21 -08:00
Ian Hickson
8c44c38299 Include BoxDecoration description in Container toString
Have BoxDecoration default to one-line dumps

Style nits in a rendering example
2016-01-14 22:20:43 -08:00
Adam Barth
8e5dd7a385 Remove clamp() in favour of double.clamp()
Fixes #961
2016-01-12 09:19:33 -08:00
Ian Hickson
c8ac09a56d Merge pull request #1042 from Hixie/wordSpacing
Hook up wordSpacing and inline height.
2016-01-04 15:38:56 -08:00
Adam Barth
46a178dce6 Generalize grid layout
This patch make grid layout much more flexible. The behavior is factored
out into a GridDelegate that's modeled after the custom layout
delegates. The patch includes a MaxTileWidthGridDelegate that implements
the old behavior and a FixedColumnCountGridDelegate that implements a
grid layout with a fixed number of columns.

Fixes #1048
2016-01-02 14:30:45 -08:00
Ian Hickson
4588524ca7 Hook up wordSpacing and inline height.
Also, trivial improvements to the baseline example that I made while
unsuccessfully trying to reproduce a baseline bug.
2015-12-30 12:05:44 -08:00
Ian Hickson
ade93651ac Refactor bindings. 2015-12-13 23:34:41 -08:00
Ian Hickson
928c6290e0 Remove last traces of onEvent. 2015-12-09 21:07:06 -08:00
Ian Hickson
1a049c14e5 Catch un-normalized BoxConstraints
Add BoxConstraints.isNormalized feature.

Use this feature in asserts in all the intrinsic dimension methods, in
various relevant BoxConstraints methods, and in layout().

Wrap the _DebugSize logic in BoxConstraints.constrain() in an assert
block to avoid a branch in release mode.

Remove the logic in BoxConstraints.isSatisfiedBy() that dealt with
non-normalized values.

Add BoxConstraints.normalize().

Make RenderCustomOneChildLayoutBox.performLayout() only set
parentUsesSize on the child if the constraints aren't tight.
2015-12-08 21:35:39 -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
abf0359569 Remove PaintingCanvas
We can just use Canvas now.  The two are the same thing.
2015-12-04 20:26:08 -08:00
Florian Loitsch
018bcbf2d9 Remove animation scheduler. 2015-12-01 20:36:52 -08:00
Adam Barth
72329cf422 Callback identity is too fragile for CustomPaint
Many of the widgets that use CustomPaint were spamming repaints because
CustomPaint repaints when the identity of the onPaint callback changes, which
it does every build for StatelessComponents.

This patch changes CustomPaint to use a CustomPainter, similar to the new
custom layout widgets. The CustomPainter has a `shouldRepaint` function along
with its `paint` function. This function gives clients explicit control over
when the custom paint object repaints.
2015-11-20 08:20:59 -08:00
Adam Barth
fc576814d5 Refactor PaintingContext
This patch simplifies PaintingContext with several goals:

1) We now call a callback instead of assuming the caller has a single child to
   paint. This change will let us handle render objects that wish to paint more
   than one child.
2) We now avoid creating lots of empty picture layers because we don't eagerly
   start recording pictures. Instead, we wait for the first caller to touch the
   canvas before creating the picture recorder.
3) We now are more consistent about which values have incorporated the painting
   offset.
2015-11-19 11:18:04 -08:00
Hans Muller
d9153a13c6 Update shadow rendering
Shadows now render as three seprate MaskFilter.blur components per the most recent Material spec.

The shadows Map was replaced by a similar Map called elevationToShadow with entries that match the 10 elevations specifed by http://www.google.com/design/spec/what-is-material/elevation-shadows.html.

The "level" property (many classes) is now called "elevation", to match the Material spec.

BoxShadow now includes a spreadRadius parameter - as in CSS box-shadow. Renamed the BoxShadow blur property to blurRadius to further align BoxShadow with CSS box-shadow.
2015-11-18 07:58:28 -08:00
John McCutchan
d1e62a39e2 Update four callers of Message constructor to pass in required arguments 2015-11-13 14:39:06 -08:00
Jason Simmons
22f26be88f Update the interactive_flex example for the new event handlers 2015-11-11 17:24:33 -08:00
Adam Barth
08539b4e4d Rewire the pubspecs to use local paths
Using local paths ensures that each package sees each other package at HEAD.
2015-11-06 22:46:52 -08:00
Adam Barth
e971f32648 Rev pubspecs 2015-11-02 13:19:55 -08:00
Hixie
fca9b8f3d6 Rev package versions for release.
sky_engine is now at 0.0.45
sky_services is now at 0.0.45
flx is now at 0.0.4
flutter is now at 0.0.15
flutter_sprites is now at 0.0.12
2015-10-29 14:41:56 -07:00
Hixie
cbf9eab8fe Rev package versions for release.
sky_engine is now at 0.0.44
sky_services is now at 0.0.44
flx is now at 0.0.3
flutter is now at 0.0.14
flutter_sprites is now at 0.0.11
2015-10-28 14:54:33 -07:00
Adam Barth
3373d0ba01 Switch clients from ui.view to ui.window 2015-10-28 07:16:56 -07:00
Hixie
a6c473ea95 Strong modeify the examples
This makes skyanalyzer also check the examples, and fixes everything it
found there.
2015-10-23 18:13:25 -07:00
Hixie
bd9036cdb8 Port spinning_mixed demo to fn3 2015-10-22 14:20:13 -07:00
Hixie
1e9e4e159d RenderOverflowBox baseline logic
I accidentally lost this when extracting RenderOverflowBox from
RenderProxyBox.
2015-10-20 09:52:48 -07:00
Adam Barth
529fa95f87 Give the CustomPaint and SizeObserver callbacks better names
The style we use for callbacks in widgets is "onFoo". These classes were using
an order naming convention and just called their callbacks "callback".
2015-10-19 17:27:40 -07:00
Adam Barth
8382ca2c0a Fix analyzer warnings in examples 2015-10-19 13:46:52 -07:00
Adam Barth
2aa79d5694 Remove old setFoo functions on Paint
We now just use Dart properties, which is more idiomatic.
2015-10-19 12:21:34 -07:00
Jason Simmons
5b72a2fdaf Fix warnings seen when running skyanalyzer in strong mode 2015-10-15 10:56:03 -07:00
Kris Giesing
0c22900861 Merge remote-tracking branch 'upstream/master' into events-merge 2015-10-13 15:35:45 -07:00
Kris Giesing
ec205ac5c5 Add dart-layer input event abstraction 2015-10-13 15:16:04 -07:00
Hixie
1cf1cf9c64 Port first sector demo to fn3
Also, fix warnings in rendering/sector_layout.dart
Also, fix hit testing in rendering/sector_layout.dart
Also, add WidgetToRenderBoxAdapter
Also, make the rendering library debugging tools more resilient to
dumping stuff before layout is complete.
2015-10-13 14:21:52 -07:00
Adam Barth
5a7d21675a Remove demo_launcher
This example is outdated.
2015-10-12 14:20:28 -07:00
Adam Barth
f9a7ed047d Reattach fitness to the build
We can build Fitness again now that playfair has been updated to account for
the package:flutter rename.
2015-10-12 00:24:24 -07:00
Adam Barth
ecce1eb389 Import dart:ui as ui (instead of as sky) 2015-10-09 20:55:54 -07:00
Adam Barth
65eba90843 Rename package:sky to package:flutter 2015-10-09 20:44:52 -07:00
Adam Barth
5b37f8750d Rename dart:sky to dart:ui 2015-10-09 19:27:13 -07:00
Adam Barth
db191e96bd Switch scheduler over to Duration
This patch prepares us to switch to using integers when handing off the
animation time from the engine to the framework.
2015-10-03 13:48:57 -07:00
Adam Barth
a74d02dadf Rename Sky to Flutter in a few more places 2015-09-26 12:46:03 -07:00
Adam Barth
051354ae1d Remove EventDisposition
All the use cases for EventDisposition are now addressed by the gesture
detection system.
2015-09-21 16:45:09 -07:00
Adam Barth
4467a268ce Move theme into material.dart
Also, introduce Colors and Typography to hold the material colors and the
typography declarations. Previously we expected clients of these libraries to
import them into a namespace, but that doesn't play nice with re-exporting them
from material.dart.
2015-09-18 09:57:21 -07:00
Adam Barth
7064551a45 Move mojo frontend into services.dart
What's important about this code is that it's presenting services outside the
VM, not the particular technology used to present the services.
2015-09-16 19:13:50 -07:00
Adam Barth
87c75d6e76 Remove redundant enum declarations from text_style.dart
These are now declared in dart:sky as part of ParagraphBuilder.
2015-09-10 08:03:48 -07:00