Files
wayvr/uidev/assets/gui/dashboard.xml
Aleksander 4e46c45bcf wgui: Refactoring, various changes (see desc)
- use parking_lot for mutex (less restrictive and easier to use)
- simplify event callbacks and widget type casting
- defer component initialization at start (required for setting the initial state of sliders)
- fix non-working scroll events
- update testbed.xml
- replace slider with the real one in bar.xml
- show slider text on its handle
2025-07-29 22:12:01 +02:00

109 lines
4.4 KiB
XML

<layout>
<include src="theme.xml" />
<include src="templates.xml" />
<theme>
<var key="side_sprite_size" value="26" />
</theme>
<elements>
<!-- background for testing -->
<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">
<!-- LEFT MENU -->
<div id="menu" width="48" min_width="48" max_width="48" height="100%" align_items="center" justify_content="center">
<rectangle
width="100%"
round="100%"
color="~menu_dark"
flex_direction="column"
justify_content="center"
align_items="center"
gap="24"
padding_top="16"
padding_bottom="16"
>
<sprite src="dashboard/wayvr_dashboard_mono.svg" width="~side_sprite_size" height="~side_sprite_size" />
<sprite src="dashboard/apps.svg" width="~side_sprite_size" height="~side_sprite_size" />
<sprite src="dashboard/games.svg" width="~side_sprite_size" height="~side_sprite_size" />
<sprite src="dashboard/monado.svg" width="~side_sprite_size" height="~side_sprite_size" />
<sprite src="dashboard/window.svg" width="~side_sprite_size" height="~side_sprite_size" />
<rectangle height="2" color="#FFFFFF33" width="~side_sprite_size" />
<sprite src="dashboard/settings.svg" width="~side_sprite_size" height="~side_sprite_size" />
</rectangle>
</div>
<!-- REST -->
<!-- content/bottom panel separator -->
<div flex_direction="column" gap="8" flex_grow="1">
<!-- CONTENT -->
<rectangle
color2="#0d131acc" color="#244179aa" gradient="vertical" round="8" overflow_y="hidden"
justify_content="center"
flex_grow="1"
>
<div
id="content"
overflow_x="scroll"
overflow_y="scroll"
align_items="center"
justify_content="center"
flex_direction="column"
gap="24"
>
<sprite src="dashboard/wayvr_dashboard.svg" min_width="96" min_height="96" />
<label text="Hello, user!" size="32" weight="bold" color="#FFFFFF" />
<label text="Connected to wlx-overlay-s" size="16" weight="bold" color="#bbffbb" />
<!-- main button list -->
<div flex_direction="row" gap="8" margin_top="32">
<MenuButton icon="dashboard/apps.svg" text="Apps" />
<MenuButton icon="dashboard/games.svg" text="Games" />
<MenuButton icon="dashboard/monado.svg" text="Monado" />
<MenuButton icon="dashboard/window.svg" text="Processes" />
<MenuButton icon="dashboard/settings.svg" text="Settings" />
</div>
</div>
</rectangle>
<!-- BOTTOM PANEL -->
<rectangle
width="100%"
height="48"
box_sizing="border_box"
round="8"
flex_direction="row"
align_items="center"
justify_content="space_between"
color="~bottom_panel"
>
<!-- left gradient -->
<div position="absolute" width="100%" height="100%" justify_content="start">
<rectangle position="absolute" width="40%" height="100%" color="#0a0a0a" color2="#0a0a0a00" round="8" gradient="horizontal" />
</div>
<!-- right gradient -->
<div position="absolute" width="100%" height="100%" justify_content="end">
<rectangle position="absolute" width="40%" height="100%" color2="#0a0a0a" color="#0a0a0a00" round="8" gradient="horizontal" />
</div>
<!-- top shine -->
<div position="absolute" width="100%" height="100%" justify_content="center">
<rectangle position="absolute" width="99%" height="2" color="#FFFFFF66" round="4" />
</div>
<!-- Left bottom side -->
<div margin_left="8">
<sprite src="dashboard/volume.svg" width="24" height="24" margin="8" />
<sprite src="dashboard/recenter.svg" width="24" height="24" margin="8" />
</div>
<!-- Right bottom side -->
<div margin_right="16">
<label text="12:34" color="#FFFFFF" size="16" />
</div>
</rectangle>
</div>
</div>
</elements>
</layout>