dash-frontend: Use native <Button>s, children support

This commit is contained in:
Aleksander
2025-09-13 12:49:36 +02:00
parent c2628c0a15
commit 9efe298f65
13 changed files with 117 additions and 82 deletions

View File

@@ -11,7 +11,7 @@
<rectangle position="absolute" color="#333333" width="100%" height="100%" />
<!-- left/right separator (menu and rest) -->
<div flex_direction="row" gap="8" width="950" height="550">
<div flex_direction="row" gap="8" width="100%" height="100%">
<!-- LEFT MENU -->
<div id="menu" width="48" min_width="48" max_width="48" height="100%" align_items="center" justify_content="center">
<rectangle

View File

@@ -1,19 +1,18 @@
<layout>
<template name="MenuButton">
<rectangle
<Button
width="120"
height="82"
round="8"
border="2"
border_color="#FFFFFF77"
color="#00000033"
align_items="center"
justify_content="center"
flex_direction="column"
gap="8"
>
<sprite src="${icon}" width="32" height="32" />
<label weight="bold" color="#FFFFFF" size="18" text="${text}" />
</rectangle>
border_color="#FFFFFF77"
round="8">
<div gap="8"
align_items="center"
justify_content="center"
flex_direction="column">
<sprite src="${icon}" width="32" height="32" />
<label weight="bold" color="#FFFFFF" size="18" text="${text}" />
</div>
</Button>
</template>
</layout>