Update access-kit to 0.17.0

This commit is contained in:
Pāvels Nadtočajevs
2025-07-24 10:15:41 +03:00
parent 2d113cc224
commit 3f757c41fc
14 changed files with 289 additions and 50 deletions

View File

@ -413,19 +413,35 @@ void ScrollContainer::_accessibility_action_scroll_set(const Variant &p_data) {
}
void ScrollContainer::_accessibility_action_scroll_up(const Variant &p_data) {
v_scroll->set_value(v_scroll->get_value() - v_scroll->get_page() / ScrollBar::PAGE_DIVISOR);
if ((DisplayServer::AccessibilityScrollUnit)p_data == DisplayServer::SCROLL_UNIT_ITEM) {
v_scroll->set_value(v_scroll->get_value() - v_scroll->get_page() / ScrollBar::PAGE_DIVISOR);
} else {
v_scroll->set_value(v_scroll->get_value() - v_scroll->get_page());
}
}
void ScrollContainer::_accessibility_action_scroll_down(const Variant &p_data) {
v_scroll->set_value(v_scroll->get_value() + v_scroll->get_page() / ScrollBar::PAGE_DIVISOR);
if ((DisplayServer::AccessibilityScrollUnit)p_data == DisplayServer::SCROLL_UNIT_ITEM) {
v_scroll->set_value(v_scroll->get_value() + v_scroll->get_page() / ScrollBar::PAGE_DIVISOR);
} else {
v_scroll->set_value(v_scroll->get_value() + v_scroll->get_page());
}
}
void ScrollContainer::_accessibility_action_scroll_left(const Variant &p_data) {
h_scroll->set_value(h_scroll->get_value() - h_scroll->get_page() / ScrollBar::PAGE_DIVISOR);
if ((DisplayServer::AccessibilityScrollUnit)p_data == DisplayServer::SCROLL_UNIT_ITEM) {
h_scroll->set_value(h_scroll->get_value() - h_scroll->get_page() / ScrollBar::PAGE_DIVISOR);
} else {
h_scroll->set_value(h_scroll->get_value() - h_scroll->get_page());
}
}
void ScrollContainer::_accessibility_action_scroll_right(const Variant &p_data) {
h_scroll->set_value(h_scroll->get_value() + h_scroll->get_page() / ScrollBar::PAGE_DIVISOR);
if ((DisplayServer::AccessibilityScrollUnit)p_data == DisplayServer::SCROLL_UNIT_ITEM) {
h_scroll->set_value(h_scroll->get_value() + h_scroll->get_page() / ScrollBar::PAGE_DIVISOR);
} else {
h_scroll->set_value(h_scroll->get_value() + h_scroll->get_page());
}
}
void ScrollContainer::_notification(int p_what) {