Collin Jackson
b6a3f8eef9
Extend Sky's RenderFlex with intrinsic sizes and compute cross-size height
...
Renders interactive_flex and stocks demos fine. Could use more testing,
so I'm going to work on that after I land this.
R=abarth@chromium.org , abarth
Review URL: https://codereview.chromium.org/1173493003
2015-06-10 10:11:58 -07:00
Matt Perry
fe153f179a
Add LinearBoxGradient and RadialBoxGradient decorations for RenderDecoratedBox.
...
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1175763002 .
2015-06-10 12:23:57 -04:00
Viktor Lidholt
3260d9988d
Adds support for zOrder and references to parent nodes in sprites, also start of new test app.
...
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1177563004 .
2015-06-10 09:21:01 -07:00
Adam Barth
0e5bb2d231
Add a basic InkWell implementation
...
This CL replaces the (non-working) components2 InkWell with some code based on
the ink_well example. There are at least two issues with the implementation:
1) The ink splash always starts at the center of the well because we don't have
a facility for converting from global to local coordinates, which means we
can't tell where the tap occurred in the local coordinates we need to use
for painting.
2) When used inside a MenuItem, the in splash disappears shortly after
starting, presumably because the button starts highlighting, which causes a
component rebuild and somehow we lose the RenderInkWell instance.
I plan to address these issues in subsequent CLs.
R=ianh@google.com
Review URL: https://codereview.chromium.org/1172033003 .
2015-06-10 09:04:15 -07:00
Hans Muller
ad5df9147f
Vertically center stock demo row contents, better up/down arrows
...
StockRows are now a relatively simple application of flex layout.
The up/down arrows are now rendered within a circle, like
the original version. The arrows are a little bigger,
because.
R=ianh@google.com
Review URL: https://codereview.chromium.org/1165223005 .
2015-06-09 15:59:18 -07:00
Hixie
be5cc1a27e
OneChildRenderObjectWrapper and Scaffold were ignoring the return value of syncChild().
...
This would cause them to forget what the most recent child they'd been given was, with disastrous effects later.
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1173683003
2015-06-09 12:23:17 -07:00
Matt Perry
ba6a9a2ba5
Sky: Allow clients to specify tile mode for gradients (repeating or mirror).
...
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1166223004 .
2015-06-09 15:21:46 -04:00
Eric Seidel
6b3840e384
Move image loading out of C++ into Dart
...
We already know how to talk to the network_service from Dart
via fetch.dart. Might as well use that for Image loading
as well insetad of having ImageLoader do it.
As part of this I've renamed *ImageLoader to *ImageDecoder
and moved all the image loading logic into Dart. This required
me to teach the idl system about mojo handles so that I could
pass the resulting MojoHandle from fetch.dart up through to
ImageDecoder.
R=abarth@chromium.org , jackson@google.com , hansmuller@google.com
Review URL: https://codereview.chromium.org/1173703002 .
2015-06-09 12:14:13 -07:00
Matt Perry
5a0b18490f
Change the ColorFilter constructor to ColorFilter.Mode, in case we want to add
...
more ColorFilter types.
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1163373007 .
2015-06-09 14:55:52 -04:00
Hans Muller
3aeadb34a6
Added a key: parameter to ParentDataNode, ContentDataNode
...
The FlexExpandingChild flex parameter is now a keyword as
well, which adds a small readability benefit.
R=ianh@google.com
Review URL: https://codereview.chromium.org/1172503004 .
2015-06-09 11:00:47 -07:00
Adam Barth
44a0af042c
Add a proper material shadow the popup menu
...
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1172723002 .
2015-06-09 10:31:39 -07:00
Matt Perry
71cf849271
Sky: Added radial gradients.
...
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1169863002 .
2015-06-09 12:45:02 -04:00
Adam Barth
2bc982d676
Position the popup menu in stocks2 correctly
...
This CL pulled an implementation of position: absolute in RenderStackContainer.
R=eseidel@chromium.org , ianh@google.com
Review URL: https://codereview.chromium.org/1166363002 .
2015-06-09 09:22:50 -07:00
Hans Muller
e158527d6d
Restore stock_arrow element of the stocks2 demo
...
This version doesn't add any visual punch.
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1172513002 .
2015-06-09 09:05:25 -07:00
Adam Barth
b7e81c798a
Split getIntrinsicDimensions into four pieces
...
This CL splits getIntrinsicDimensions into getMinIntrinsicWidth,
getMaxIntrinsicWidth, getMinIntrinsicHeight, and getMaxIntrinsicHeight so that
we can properly shrink-wrap the stocks app menu. This CL just contains the
refactoring. The use in stocks app will come in a later CL.
R=ianh@google.com
Review URL: https://codereview.chromium.org/1167293003
2015-06-08 14:40:34 -07:00
Hixie
37f0b0240b
Convert everything in the Sky API from degrees to radians.
...
Radians are the one true angle unit.
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1164393002
2015-06-08 14:38:06 -07:00
Hixie
8ade37c5aa
Rename Container's desiredSize argument to width and height arguments.
...
Also change SizedBox.
This makes the code that uses Container() and SizedBox() much more readable.
The underlying RenderSizedBox is not affected by this change.
R=abarth@chromium.org , eseidel@chromium.org
Review URL: https://codereview.chromium.org/1166203002
2015-06-08 14:36:19 -07:00
Collin Jackson
62bff5f7ef
Sky support for flexbox justify content
...
R=abarth@chromium.org , abarth
Review URL: https://codereview.chromium.org/1164363002
2015-06-08 14:14:02 -07:00
Adam Barth
824bc31626
Add Point.origin for new Point(0.0, 0.0)
...
R=eseidel@chromium.org , ianh@google.com
Review URL: https://codereview.chromium.org/1166183002
2015-06-08 13:36:52 -07:00
Adam Barth
81e8e2b564
Add a basic popup menu implementation to stocks2
...
The popup menu is displayed in the wrong location with the wrong width, but it
does draw. I've also removed the checkbox because the flex container was
causing me trouble. I'll add it back in a later CL.
R=ianh@google.com
Review URL: https://codereview.chromium.org/1166153002
2015-06-08 12:52:15 -07:00
Hixie
77f5d4724a
Port DrawerHeader to fn2 world.
...
This includes making SizedBox default to infinite size, and making
Container default to containing one infinite-sized SizedBox. That way,
you can use an empty Container as a spacer in a flex box.
The rendering doesn't quite work, because of a bug in flex whereby it
doesn't shrink-wrap its contents in the cross-direction, it fills the
parent. Collin is on that.
R=jackson@google.com
Review URL: https://codereview.chromium.org/1163633003
2015-06-08 11:00:05 -07:00
Matt Perry
1f26d65757
Add support for linear gradients, implemented as skia shaders.
...
I had to complicate the IDL bindings generation to allow passing an array of
colors. Without these changes, we'd try to convert the dart object to
Vector<SkColor>, which C++ thinks is Vector<unsigned>, and we'd use the wrong
converter. So I added some template grease to force it to use a
Vector<CanvasColor> converter.
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1152963009
2015-06-08 13:49:10 -04:00
Adam Barth
1526e5f8e0
Introduce sky.Sky.zero
...
And deploy it in a few places.
R=ianh@google.com
Review URL: https://codereview.chromium.org/1164303002
2015-06-08 10:09:03 -07:00
Collin Jackson
c6a1a066f2
Implement a simple checkbox in Sky’s fn2 components library
...
R=abarth@chromium.org , abarth
Review URL: https://codereview.chromium.org/1161813005
2015-06-05 14:51:37 -07:00
Adam Barth
f2bc5caa07
Add the floating action button to stocks2
...
The + isn't quite centered properly, but the button is a circle in the right
place.
R=eseidel@chromium.org , ianh@google.com
Review URL: https://codereview.chromium.org/1156383004
2015-06-05 10:07:51 -07:00
Collin Jackson
baa62abc67
Implement radio button for Sky’s fn2
...
R=abarth@chromium.org , eseidel@chromium.org , abarth
Review URL: https://codereview.chromium.org/1157573012
2015-06-04 17:24:38 -07:00
Viktor Lidholt
824a66399e
Adds a spaceship and (somewhat crappy) controls to the example game.
...
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1151793003
2015-06-04 17:14:46 -07:00
Adam Barth
e5581e80ed
stock2 should actually show some stocks data
...
We're having trouble shrinkwrapping text, so this CL sets an explicit size for
the last sale and the change in price.
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1164763006
2015-06-04 16:35:56 -07:00
Hixie
b7c588661c
Rename "BorderSide.None" to "BorderSide.none", since it's a constant, and change the sky.Size.infinite() constructor to a constant.
...
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1158263005
2015-06-04 16:17:20 -07:00
Adam Barth
6559a8b68e
Make the StockList actually work in stocks2
...
RenderScaffold needs to attach and detach its children when asked.
R=eseidel@chromium.org , ianh@google.com
Review URL: https://codereview.chromium.org/1149893025
2015-06-04 15:50:07 -07:00
Hixie
a33db92d62
Improve the RenderObject.toString() logic so that there's not blank lines everywhere and to generally be better.
...
Adds sizes, positions, transforms, improves RenderParagraph's output.
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1160233004
2015-06-04 15:45:44 -07:00
Eric Seidel
7ebb281c5c
Fix examples/game to work after Hixie's grand rename.
...
TBR=viktorl@google.com
Review URL: https://codereview.chromium.org/1158273009
2015-06-04 15:25:46 -07:00
Eric Seidel
8a0caf8ed4
Start making input work
...
Does not work yet.
R=ianh@google.com
Review URL: https://codereview.chromium.org/1163973005
2015-06-04 15:18:09 -07:00
Adam Barth
b76af41f63
Prepare StockList for use in stocks2
...
This CL does a bunch of ground work for getting StockList ready for use in
stocks2. It's still not quite working because of an interaction with Scaffold
that we don't fully understand.
R=eseidel@chromium.org , ianh@google.com
Review URL: https://codereview.chromium.org/1148793005
2015-06-04 15:10:09 -07:00
Eric Seidel
b05d618e62
Attempt to write a RenderShadowedBox
...
The goal of this is to have a Renderer-layer abstraction
around the Sky Engine c++ apis for drawing a shadow.
R=mpcomplete@chromium.org
Review URL: https://codereview.chromium.org/1146893004
2015-06-04 14:49:24 -07:00
Collin Jackson
f66a933a55
Implement menu_divider
...
R=abarth@chromium.org , abarth
Review URL: https://codereview.chromium.org/1163913004
2015-06-04 13:11:40 -07:00
Hixie
68369e9d62
Style guide says enum values should be lowerCamelCase.
...
https://www.dartlang.org/articles/style-guide/#names
R=jackson@google.com
Review URL: https://codereview.chromium.org/1158813004
2015-06-04 12:24:10 -07:00
Viktor Lidholt
3b06e1e1f7
Adds support for transfer mode in Paint and SpriteNode classes. Adds support for opacity in sprites, and modifies example game.
...
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1164633004
2015-06-04 11:14:07 -07:00
Collin Jackson
bcf65bd04c
Stub out InkWell and implement Sky’s fn2 menu item
...
R=abarth@chromium.org , ianh@google.com , abarth, hixie
Review URL: https://codereview.chromium.org/1165983002
2015-06-04 11:04:01 -07:00
Matt Perry
30dac5853d
Canvas.concat takes a 16-element Float32List instead of an array.
...
The array should be in column-major format, in the format used by vector_math.dart.
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1155193004
2015-06-04 13:51:44 -04:00
Hixie
433df32cd0
Enable RenderDecoratedBox to draw borders.
...
Currently supports only solid borders, but of any colour and size, independently controlling each side.
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1154903006
2015-06-04 10:50:59 -07:00
Adam Barth
9bdb39d0ec
Fix build after hixie's rename
...
TBR=ianh@google.com
Review URL: https://codereview.chromium.org/1164073002
2015-06-04 10:49:05 -07:00
Hixie
395102d5ca
Rename RenderNode to RenderObject.
...
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1165013003
2015-06-04 10:45:21 -07:00
Adam Barth
e99c880bc2
Fix gesture events in fn2
...
This CL makes gesture events work again in fn2.
R=ianh@google.com
Review URL: https://codereview.chromium.org/1146923005
2015-06-03 16:06:15 -07:00
Hixie
d268da7ad5
Plug the drawer into stock2.
...
Not tested on device.
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1160523005
2015-06-03 15:36:48 -07:00
Eric Seidel
7f705336e8
Fork theme to theme2 and use sky.Color types directly.
...
This also works around an Android-only crasher for the Dart VM:
https://github.com/domokit/mojo/issues/192
R=ianh@google.com
Review URL: https://codereview.chromium.org/1157243012
2015-06-03 15:22:08 -07:00
Collin Jackson
fef65fc431
Implement RenderImage and Image for Sky
...
This also fixes a bug that was preventing markNeedsLayout from working
R=abarth@chromium.org , eseidel@chromium.org , abarth, eseidel
Review URL: https://codereview.chromium.org/1160013004
2015-06-03 15:17:12 -07:00
Viktor Lidholt
006da931cf
Sky example game enhancements, adds preloading of images and adds transform modes to SpriteBox
...
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1149183004
2015-06-03 15:05:55 -07:00
Hixie
686123e117
Add overlays back to stocks2.
...
Except that nothing actually uses these now so it's a no-op really.
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1157243011
2015-06-03 15:03:34 -07:00
Hixie
3783ad3717
Fix scaffold to work for the toolbar.
...
Also, make the scaffold code more generic (with slots in a map,
instead of dedicated members for each slot).
This may eventually benefit from being split into a general
"multislot" superclass and a scaffold-specific subclass, but for now
it'll do.
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1152163007
2015-06-03 14:50:32 -07:00