Move graphical_layout test to test1.1 in an attempt to avoid "segment data does not fit" issues

This commit is contained in:
Michael Davidson 2024-01-03 23:39:00 +11:00
parent d7b512fc93
commit 1f7554ea1c
No known key found for this signature in database
GPG Key ID: B8D1A99712B8B0EB
2 changed files with 62 additions and 40 deletions

View File

@ -230,3 +230,65 @@ button:
- canbus.send: "abc" - canbus.send: "abc"
- canbus.send: [0, 1, 2] - canbus.send: [0, 1, 2]
- canbus.send: !lambda return {0, 1, 2}; - canbus.send: !lambda return {0, 1, 2};
display:
- platform: ili9xxx
invert_colors: true
dimensions: 320x240
transform:
swap_xy: true
mirror_x: true
mirror_y: false
model: TFT 2.4
cs_pin:
allow_other_uses: true
number: GPIO5
dc_pin:
allow_other_uses: true
number: GPIO4
color_palette: GRAYSCALE
reset_pin:
allow_other_uses: true
number: GPIO22
lambda: |-
it.rectangle(0, 0, it.get_width(), it.get_height());
graphical_layout:
id: test_graphical_layout
layout:
type: horizontal_stack
child_align: stretch_to_fit_height
items:
- type: fixed_dimension_panel
width: 100
height: 100
border: 1
child:
type: text_panel
text: "Simple text panel"
font: roboto
- type: vertical_stack
item_padding: 1
margin: 1
padding: 1
border: 1
border_color: layout_black
items:
- type: display_rendering_panel
height: 50
width: 50
lambda: |-
it.filled_circle(25, 25, 10);
- type: text_run_panel
text_align: baseline_center
max_width: 100
runs:
- font: roboto
text: Hello
- font: roboto
text: World
background_color: layout_black
foreground_color: layout_white
- font: roboto
text: !lambda |-
return "Dynamic text";

View File

@ -4323,43 +4323,3 @@ alarm_control_panel:
then: then:
- lambda: !lambda |- - lambda: !lambda |-
ESP_LOGD("TEST", "State change %s", alarm_control_panel_state_to_string(id(alarmcontrolpanel1)->get_state())); ESP_LOGD("TEST", "State change %s", alarm_control_panel_state_to_string(id(alarmcontrolpanel1)->get_state()));
graphical_layout:
id: test_graphical_layout
layout:
type: horizontal_stack
child_align: STRETCH_TO_FIT_HEIGHT
items:
- type: fixed_dimension_panel
width: 100
height: 100
border: 1
child:
type: text_panel
text: "Simple text panel"
font: roboto
- type: vertical_stack
item_padding: 1
margin: 1
padding: 1
border: 1
border_color: layout_black
items:
- type: display_rendering_panel
height: 50
width: 50
lambda: |-
it.filled_circle(25, 25, 10);
- type: text_run_panel
text_align: BASELINE_CENTER
max_width: 100
runs:
- font: roboto
text: Hello
- font: roboto
text: World
background_color: layout_black
foreground_color: layout_white
- font: roboto
text: !lambda |-
return "Dynamic text";