new rendering engine
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
use client_application::{ClientApp, RepaintCommand};
|
||||
use client_domain::BoundingBox;
|
||||
use protocol::{
|
||||
ServerMessage, WidgetDescriptor, WireContainerNode, WireDirection, WireDisplayHint,
|
||||
WireKeyValue, WireLayoutChild, WireLayoutNode, WireSizing, WireValue, WireWidgetState,
|
||||
ServerMessage, WidgetDescriptor, WireAlignItems, WireContainerNode, WireDirection,
|
||||
WireDisplayHint, WireDisplayHintKind, WireJustifyContent, WireKeyValue, WireLayoutChild,
|
||||
WireLayoutNode, WireSizing, WireValue, WireWidgetState,
|
||||
};
|
||||
|
||||
fn screen() -> BoundingBox {
|
||||
@@ -12,7 +13,7 @@ fn screen() -> BoundingBox {
|
||||
fn weather_descriptor(id: u16, temp: &str) -> WidgetDescriptor {
|
||||
WidgetDescriptor {
|
||||
id,
|
||||
display_hint: WireDisplayHint::IconValue,
|
||||
display_hint: WireDisplayHint::new(WireDisplayHintKind::IconValue),
|
||||
state: WireWidgetState {
|
||||
data: vec![WireKeyValue {
|
||||
key: "temperature".into(),
|
||||
@@ -28,6 +29,8 @@ fn two_widget_layout() -> WireLayoutNode {
|
||||
direction: WireDirection::Row,
|
||||
gap: 0,
|
||||
padding: 0,
|
||||
justify_content: WireJustifyContent::Start,
|
||||
align_items: WireAlignItems::Stretch,
|
||||
children: vec![
|
||||
WireLayoutChild {
|
||||
sizing: WireSizing::Flex(1),
|
||||
@@ -121,6 +124,8 @@ fn second_screen_update_repaints_all_widgets_with_new_layout() {
|
||||
direction: WireDirection::Column,
|
||||
gap: 0,
|
||||
padding: 0,
|
||||
justify_content: WireJustifyContent::Start,
|
||||
align_items: WireAlignItems::Stretch,
|
||||
children: vec![
|
||||
WireLayoutChild {
|
||||
sizing: WireSizing::Flex(1),
|
||||
|
||||
Reference in New Issue
Block a user