settings implementation

This commit is contained in:
galister
2026-01-07 02:16:43 +09:00
parent 51dbb6f14d
commit ce558855d4
21 changed files with 561 additions and 351 deletions

View File

@@ -2,53 +2,37 @@
<include src="t_tab_title.xml" />
<include src="../t_group_box.xml" />
<template name="SettingsGroupBox">
<rectangle macro="group_box" id="${id}">
<GroupBoxTitle translation="${translation}" src_builtin="${icon}" />
</rectangle>
</template>
<template name="CheckBoxSetting">
<CheckBox id="${id}" text="${text}" translation="${translation}" checked="${checked}" tooltip="${tooltip}" />
</template>
<template name="SliderSetting">
<label text="${text}" translation="${translation}" />
<Slider id="${id}" width="250" height="24" min_value="${min}" max_value="${max}" step="${step}" value="${value}" tooltip="${tooltip}" />
</template>
<template name="SelectSetting">
<label text="${text}" translation="${translation}" tooltip="${tooltip}" />
<RadioGroup id="${id}" />
</template>
<template name="SelectOption">
<RadioBox text="${text}" translation="${translation}" value="${value}" tooltip="${tooltip}" />
</template>
<elements>
<TabTitle translation="SETTINGS" icon="dashboard/settings.svg" />
<div flex_wrap="wrap" justify_content="stretch" gap="4">
<!-- Home screen -->
<rectangle macro="group_box">
<GroupBoxTitle translation="HOME_SCREEN" src_builtin="dashboard/wayvr_dashboard.svg" />
<CheckBox id="cb_hide_username" translation="APP_SETTINGS.HIDE_USERNAME" />
</rectangle>
<!-- General settings -->
<rectangle macro="group_box">
<GroupBoxTitle translation="GENERAL_SETTINGS" src_builtin="dashboard/settings.svg" />
<CheckBox id="cb_am_pm_clock" text="AM/PM clock" />
<CheckBox id="cb_opaque_background" translation="APP_SETTINGS.OPAQUE_BACKGROUND" />
</rectangle>
<!-- Application launcher -->
<rectangle macro="group_box">
<GroupBoxTitle translation="APPLICATION_LAUNCHER" src_builtin="dashboard/apps.svg" />
<CheckBox id="cb_xwayland_by_default" translation="APP_SETTINGS.RUN_IN_XWAYLAND_MODE_BY_DEFAULT" />
</rectangle>
<!-- headset settings -->
<rectangle macro="group_box">
<GroupBoxTitle translation="APP_SETTINGS.HEADSET_SETTINGS" src_builtin="dashboard/vr.svg" />
<label translation="APP_SETTINGS.BRIGHTNESS" />
<Slider width="100" height="24" min_value="0.0" max_value="100.0" />
</rectangle>
<!-- wlx-overlay-s settings -->
<rectangle macro="group_box">
<GroupBoxTitle translation="APP_SETTINGS.WLX_OVERLAY_S_SETTINGS" src_builtin="dashboard/vr.svg" />
<CheckBox translation="APP_SETTINGS.WLX.NOTIFICATIONS_ENABLED" />
<CheckBox translation="APP_SETTINGS.WLX.NOTIFICATIONS_SOUND_ENABLED" />
<CheckBox translation="APP_SETTINGS.WLX.KEYBOARD_SOUND_ENABLED" />
<CheckBox translation="APP_SETTINGS.WLX.BLOCK_GAME_INPUT" />
<label translation="APP_SETTINGS.WLX.SPACE_DRAG_MULTIPLIER" />
<Slider width="100" height="24" min_value="0.0" max_value="3.0" />
<CheckBox translation="APP_SETTINGS.WLX.SPACE_DRAG_ROTATION_ENABLED" />
<CheckBox translation="APP_SETTINGS.WLX.SHOW_SKYBOX" />
<CheckBox translation="APP_SETTINGS.WLX.ENABLE_PASSTHROUGH" />
</rectangle>
</div>
<div flex_wrap="wrap" justify_content="stretch" gap="4" id="settings_root" />
<div>
<Button color="#AA3333" height="32" sprite_src_builtin="dashboard/refresh.svg" translation="APP_SETTINGS.RESTART_SOFTWARE" />
</div>
</elements>
</layout>
</layout>