mirror of
https://github.com/wayvr-org/wayvr.git
synced 2026-11-20 17:11:19 -08:00
- All new layout xml files now are required to include this metadata
at the top, if they want to be parsed in the new layout v2 behavior:
```xml
<layout version="2">
<!-- rest of the markup -->
</layout>
```
- Add path expansion using '@' for widget resources and includes
The '@' character is always expanded to the assets root directory
(builtin/internal), or the root xml directory (external).
Paths directing to the built-in resources like:
`edit/mouse.svg`
are now required to be written as:
`@/edit/mouse.svg`,
For example:
```xml
<sprite src_builtin="@/edit/mouse.svg" />
```
- All paths without '/' at the start are now treated as relative
to the currently parsing XML (paths like `/usr/share/icons/...`
are still accessible)
- Add support for relative paths for widgets instantiated from
templates
- Rename `<theme>` to `<vars>`
Changes (dash-frontend):
- Adapt and refactor XML files
Changes (wayvr):
- Adapt and refactor XML files
26 lines
815 B
XML
26 lines
815 B
XML
<layout version="2">
|
|
<macro name="dropdown_button"
|
|
flex_direction="row"
|
|
border="2"
|
|
color="background"
|
|
border_color="outline"
|
|
justify_content="space_between" />
|
|
|
|
<!-- id, text, translation, tooltip, min_width -->
|
|
<template name="DropdownButton">
|
|
<label text="${text}" translation="${translation}" />
|
|
<Button id="${id}" height="32" tooltip="${tooltip}" >
|
|
<div padding_left="8" padding_right="8" min_width="${min_width}">
|
|
<label id="${id}_value" weight="bold" />
|
|
</div>
|
|
<div gap="2">
|
|
<div padding_top="4" padding_bottom="4">
|
|
<rectangle width="2" height="100%" color="outline" />
|
|
</div>
|
|
<sprite margin_left="-4" width="30" height="30" src_builtin="@/dashboard/down.svg" />
|
|
</div>
|
|
</Button>
|
|
</template>
|
|
|
|
</layout>
|