mirror of https://github.com/wayvr-org/wayvr.git
slider & checkbox & keycaps
This commit is contained in:
parent
b1fb0d9347
commit
28a9ed2c27
|
|
@ -49,7 +49,7 @@
|
|||
<div macro="keycap_div">
|
||||
<rectangle id="${id}" macro="keycap_rect" gap="3">
|
||||
<label text="${text}" size="~text_size" />
|
||||
<label color="on_background(opacity-0.5)" text="${text_altgr}" size="~text_size" />
|
||||
<label color="on_background_variant" text="${text_altgr}" size="~text_size" />
|
||||
</rectangle>
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -59,7 +59,7 @@
|
|||
<template name="KeySymbol">
|
||||
<div macro="keycap_div">
|
||||
<rectangle id="${id}" macro="keycap_rect" gap="3">
|
||||
<label color="on_background(opacity-0.5)" text="${text_shift}" size="~text_size" />
|
||||
<label color="on_background_variant" text="${text_shift}" size="~text_size" />
|
||||
<label text="${text}" size="~text_size" />
|
||||
</rectangle>
|
||||
</div>
|
||||
|
|
@ -71,14 +71,14 @@
|
|||
<div macro="keycap_div">
|
||||
<rectangle id="${id}" macro="keycap_rect" flex_direction="row" flex_wrap="wrap" padding="4">
|
||||
<div width="50%" height="50%" align_items="center" justify_content="center">
|
||||
<label color="on_background(opacity-0.5)" text="${text_shift}" size="~text_size" />
|
||||
<label color="on_background_variant" text="${text_shift}" size="~text_size" />
|
||||
</div>
|
||||
<div width="50%" height="50%" align_items="center" justify_content="center" />
|
||||
<div width="50%" height="50%" align_items="center" justify_content="center">
|
||||
<label text="${text}" size="~text_size" />
|
||||
</div>
|
||||
<div width="50%" height="50%" align_items="center" justify_content="center">
|
||||
<label color="on_background(opacity-0.5)" text="${text_altgr}" size="~text_size" />
|
||||
<label color="on_background_variant" text="${text_altgr}" size="~text_size" />
|
||||
</div>
|
||||
</rectangle>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -97,7 +97,8 @@ pub struct ComponentCheckbox {
|
|||
state: Rc<RefCell<State>>,
|
||||
}
|
||||
|
||||
const COLOR_UNCHECKED: drawing::Color = drawing::Color::new(0.0, 0.0, 0.0, 0.0);
|
||||
const COLOR_UNCHECKED: WguiColor = WguiColorName::Background.to_wgui_color();
|
||||
const COLOR_HOVERED: WguiColor = WguiColorName::Tertiary.to_wgui_color();
|
||||
|
||||
impl ComponentTrait for ComponentCheckbox {
|
||||
fn base(&self) -> &ComponentBase {
|
||||
|
|
|
|||
|
|
@ -350,9 +350,9 @@ impl State {
|
|||
const BODY_COLOR: WguiColor = WguiColorName::Background.to_wgui_color();
|
||||
const BODY_BORDER_COLOR: WguiColor = WguiColorName::Outline.to_wgui_color();
|
||||
const HANDLE_COLOR: WguiColorName = WguiColorName::BackgroundVariant;
|
||||
const HANDLE_COLOR_HOVERED: WguiColor = WguiColorName::Secondary.to_wgui_color();
|
||||
const HANDLE_COLOR_HOVERED: WguiColor = WguiColorName::Tertiary.to_wgui_color();
|
||||
const HANDLE_BORDER_COLOR: WguiColor = WguiColorName::Outline.to_wgui_color();
|
||||
const HANDLE_BORDER_COLOR_HOVERED: WguiColor = WguiColorName::Primary.to_wgui_color().mult_rgb(1.25);
|
||||
const HANDLE_BORDER_COLOR_HOVERED: WguiColor = WguiColorName::OnTertiary.to_wgui_color();
|
||||
const HANDLE_TEXT_COLOR: WguiColorName = WguiColorName::OnBackgroundVariant;
|
||||
const HANDLE_TEXT_COLOR_HOVERED: WguiColorName = WguiColorName::OnSecondary;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue