Initial editor accessibility.

This commit is contained in:
Pāvels Nadtočajevs
2025-03-21 09:55:22 +02:00
parent 4310cb82b8
commit 302fa831cc
137 changed files with 1544 additions and 93 deletions

View File

@ -307,6 +307,7 @@ EditorBottomPanel::EditorBottomPanel() {
left_button = memnew(Button);
left_button->set_tooltip_text(TTR("Scroll Left\nHold Ctrl to scroll to the begin.\nHold Shift to scroll one page."));
left_button->set_accessibility_name(TTRC("Scroll Left"));
left_button->set_theme_type_variation("BottomPanelButton");
left_button->set_focus_mode(Control::FOCUS_NONE);
left_button->connect(SceneStringName(pressed), callable_mp(this, &EditorBottomPanel::_scroll).bind(false));
@ -323,6 +324,7 @@ EditorBottomPanel::EditorBottomPanel() {
right_button = memnew(Button);
right_button->set_tooltip_text(TTR("Scroll Right\nHold Ctrl to scroll to the end.\nHold Shift to scroll one page."));
right_button->set_accessibility_name(TTRC("Scroll Right"));
right_button->set_theme_type_variation("BottomPanelButton");
right_button->set_focus_mode(Control::FOCUS_NONE);
right_button->connect(SceneStringName(pressed), callable_mp(this, &EditorBottomPanel::_scroll).bind(true));
@ -354,6 +356,7 @@ EditorBottomPanel::EditorBottomPanel() {
pin_button->set_theme_type_variation("FlatMenuButton");
pin_button->set_toggle_mode(true);
pin_button->set_tooltip_text(TTR("Pin Bottom Panel Switching"));
pin_button->set_accessibility_name(TTRC("Pin Bottom Panel"));
pin_button->connect(SceneStringName(toggled), callable_mp(this, &EditorBottomPanel::_pin_button_toggled));
expand_button = memnew(Button);
@ -361,6 +364,7 @@ EditorBottomPanel::EditorBottomPanel() {
expand_button->hide();
expand_button->set_theme_type_variation("FlatMenuButton");
expand_button->set_toggle_mode(true);
expand_button->set_accessibility_name(TTRC("Expand Bottom Panel"));
expand_button->set_shortcut(ED_SHORTCUT_AND_COMMAND("editor/bottom_panel_expand", TTRC("Expand Bottom Panel"), KeyModifierMask::SHIFT | Key::F12));
expand_button->connect(SceneStringName(toggled), callable_mp(this, &EditorBottomPanel::_expand_button_toggled));
}