new rendering engine
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
use domain::{
|
||||
ContainerNode, Direction, DisplayHint, LayoutChild, LayoutNode, Sizing, Value, WidgetError,
|
||||
WidgetState,
|
||||
AlignItems, ContainerNode, Direction, DisplayHint, DisplayHintKind, JustifyContent,
|
||||
LayoutChild, LayoutNode, Sizing, Value, WidgetError, WidgetState,
|
||||
};
|
||||
use protocol::{
|
||||
WireContainerNode, WireDirection, WireDisplayHint, WireKeyValue, WireLayoutChild,
|
||||
@@ -43,6 +43,8 @@ fn layout_tree_converts_to_wire_and_back() {
|
||||
direction: Direction::Row,
|
||||
gap: 4,
|
||||
padding: 2,
|
||||
justify_content: JustifyContent::Start,
|
||||
align_items: AlignItems::Stretch,
|
||||
children: vec![
|
||||
LayoutChild {
|
||||
sizing: Sizing::Flex(1),
|
||||
@@ -54,6 +56,8 @@ fn layout_tree_converts_to_wire_and_back() {
|
||||
direction: Direction::Column,
|
||||
gap: 2,
|
||||
padding: 0,
|
||||
justify_content: JustifyContent::Start,
|
||||
align_items: AlignItems::Stretch,
|
||||
children: vec![LayoutChild {
|
||||
sizing: Sizing::Flex(1),
|
||||
node: LayoutNode::Leaf(2),
|
||||
@@ -71,9 +75,9 @@ fn layout_tree_converts_to_wire_and_back() {
|
||||
#[test]
|
||||
fn display_hint_converts_to_wire_and_back() {
|
||||
for hint in [
|
||||
DisplayHint::IconValue,
|
||||
DisplayHint::TextBlock,
|
||||
DisplayHint::KeyValue,
|
||||
DisplayHint::new(DisplayHintKind::IconValue),
|
||||
DisplayHint::new(DisplayHintKind::TextBlock),
|
||||
DisplayHint::new(DisplayHintKind::KeyValue),
|
||||
] {
|
||||
let wire: WireDisplayHint = (&hint).into();
|
||||
let roundtripped: DisplayHint = wire.into();
|
||||
|
||||
Reference in New Issue
Block a user