From b3e4e3799264e4585d489916e595dc0ff7f56a7c Mon Sep 17 00:00:00 2001 From: galister <22305755+galister@users.noreply.github.com> Date: Sun, 12 Jul 2026 22:56:03 +0900 Subject: [PATCH] child labels+sprites to inherit on-color from button --- dash-frontend/src/views/audio_settings.rs | 7 +- wayvr/src/assets/gui/keyboard.xml | 9 +- wayvr/src/assets/gui/watch.xml | 7 +- wayvr/src/assets/gui/whisper.xml | 3 +- wgui/src/color.rs | 21 +++ wgui/src/components/button.rs | 156 ++++++++++++++++------ wgui/src/components/tabs.rs | 2 - wgui/src/layout.rs | 2 +- wgui/src/parser/component_button.rs | 7 +- 9 files changed, 154 insertions(+), 60 deletions(-) diff --git a/dash-frontend/src/views/audio_settings.rs b/dash-frontend/src/views/audio_settings.rs index 03d90543..3c96778e 100644 --- a/dash-frontend/src/views/audio_settings.rs +++ b/dash-frontend/src/views/audio_settings.rs @@ -666,13 +666,12 @@ impl View { let mut com = layout.common(); let mut perform = |btn_num: u8, btn: &Rc| { - let (color, label_color) = if num == btn_num { - (WguiColorName::Primary, WguiColorName::OnPrimary) + let color = if num == btn_num { + WguiColorName::Primary } else { - (WguiColorName::BackgroundVariant, WguiColorName::OnBackgroundVariant) + WguiColorName::BackgroundVariant }; btn.set_color(&mut com, color.into()); - btn.set_label_color(&mut com, label_color.into()); }; perform(0, &self.btn_sinks); diff --git a/wayvr/src/assets/gui/keyboard.xml b/wayvr/src/assets/gui/keyboard.xml index b54eeffc..920a5296 100644 --- a/wayvr/src/assets/gui/keyboard.xml +++ b/wayvr/src/assets/gui/keyboard.xml @@ -95,7 +95,8 @@ + align_items="center" justify_content="center" padding="6" width="60" height="60" overflow="visible" + sticky_color="primary" sticky_border_color="primary(rgb-mult-0.5)" hover_color="tertiary" hover_border_color="tertiary(rgb-mult-0.5)" /> @@ -198,9 +199,9 @@ diff --git a/wayvr/src/assets/gui/watch.xml b/wayvr/src/assets/gui/watch.xml index 70945171..bdb11769 100644 --- a/wayvr/src/assets/gui/watch.xml +++ b/wayvr/src/assets/gui/watch.xml @@ -11,7 +11,8 @@ padding="8" color="background" border="2" border_color="outline" round="8" /> - +