make toasts pretty

This commit is contained in:
Aleksander
2025-12-16 18:57:10 +01:00
parent bdc1bf87b2
commit 326b0d710c
4 changed files with 36 additions and 8 deletions

View File

@@ -1,14 +1,27 @@
<layout>
<elements>
<div interactable="0" >
<rectangle max_width="500" max_height="400" padding="4" box_sizing="content_box" flex_wrap="wrap" flex_direction="row" gap="4" color="#000000c0" border_color="~color_accent" border="2" round="8" justify_content="space_between">
<div width="100%" padding="4">
<label text="toast title" id="toast_title" weight="bold" />
<div interactable="0">
<rectangle
max_width="500"
padding="16"
flex_direction="column"
gap="8"
color="#000000c0" border_color="~color_accent" border="2" round="8">
<!-- Toast title -->
<div flex_direction="row" align_items="center" gap="8">
<sprite src="icons/bell.svg" min_width="32" min_height="32" max_width="32" max_height="32" flex_grow="1" />
<label wrap="1" id="toast_title" weight="bold" size="25" padding_left="16" padding_right="16" />
</div>
<div width="100%" height="100%" padding="4" flex_wrap="wrap">
<label text="toast body goes here" id="toast_body" wrap="1" />
<!-- A simple separator -->
<rectangle width="100%" height="2" color="~color_accent" />
<div>
<!-- Toast message -->
<label id="toast_body" wrap="1" size="20" padding_left="16" padding_right="16" />
</div>
</rectangle>
</div>
</elements>
</layout>
</layout>