Selectively apply FOCUS_ACCESSIBILITY to the Labels instead of setting it by default.

This commit is contained in:
Pāvels Nadtočajevs 2025-04-22 11:57:16 +03:00
parent 1696ab0cb6
commit 5b49fd4207
No known key found for this signature in database
GPG key ID: 8413210218EF35D2
84 changed files with 159 additions and 14 deletions

View file

@ -242,6 +242,7 @@ void OpenXRInteractionProfileEditor::_add_io_path(VBoxContainer *p_container, co
p_container->add_child(path_hb);
Label *path_label = memnew(Label);
path_label->set_focus_mode(FOCUS_ACCESSIBILITY);
if (p_io_path->openxr_extension_name.is_empty()) {
path_label->set_text(p_io_path->display_name);
} else {
@ -252,6 +253,7 @@ void OpenXRInteractionProfileEditor::_add_io_path(VBoxContainer *p_container, co
path_hb->add_child(path_label);
Label *type_label = memnew(Label);
type_label->set_focus_mode(FOCUS_ACCESSIBILITY);
switch (p_io_path->action_type) {
case OpenXRAction::OPENXR_ACTION_BOOL: {
type_label->set_text(TTR("Boolean"));
@ -297,6 +299,7 @@ void OpenXRInteractionProfileEditor::_add_io_path(VBoxContainer *p_container, co
action_hb->add_child(indent_node);
Label *action_label = memnew(Label);
action_label->set_focus_mode(FOCUS_ACCESSIBILITY);
action_label->set_text(action->get_name_with_set() + ": " + action->get_localized_name());
action_label->set_h_size_flags(Control::SIZE_EXPAND_FILL);
action_hb->add_child(action_label);
@ -361,6 +364,7 @@ void OpenXRInteractionProfileEditor::_update_interaction_profile() {
panel->add_child(container);
Label *label = memnew(Label);
label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
label->set_text(OpenXRInteractionProfileMetadata::get_singleton()->get_top_level_name(top_level_paths[i]));
container->add_child(label);