From 14f7cbd74c8c21abcc42cce4aff54f34a91b61ed Mon Sep 17 00:00:00 2001 From: FifthTundraG <117035030+FifthTundraG@users.noreply.github.com> Date: Sun, 31 Aug 2025 18:50:13 -0400 Subject: [PATCH] Add horizontal scrolling to `TabBar` --- scene/gui/tab_bar.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scene/gui/tab_bar.cpp b/scene/gui/tab_bar.cpp index 4c9c3f5ecef..4bcd660bd8e 100644 --- a/scene/gui/tab_bar.cpp +++ b/scene/gui/tab_bar.cpp @@ -174,7 +174,7 @@ void TabBar::gui_input(const Ref &p_event) { Ref mb = p_event; if (mb.is_valid()) { - if (mb->is_pressed() && mb->get_button_index() == MouseButton::WHEEL_UP && !mb->is_command_or_control_pressed()) { + if (mb->is_pressed() && (mb->get_button_index() == MouseButton::WHEEL_UP || (is_layout_rtl() ? mb->get_button_index() == MouseButton::WHEEL_RIGHT : mb->get_button_index() == MouseButton::WHEEL_LEFT)) && !mb->is_command_or_control_pressed()) { if (scrolling_enabled && buttons_visible) { if (offset > 0) { offset--; @@ -184,7 +184,7 @@ void TabBar::gui_input(const Ref &p_event) { } } - if (mb->is_pressed() && mb->get_button_index() == MouseButton::WHEEL_DOWN && !mb->is_command_or_control_pressed()) { + if (mb->is_pressed() && (mb->get_button_index() == MouseButton::WHEEL_DOWN || mb->get_button_index() == (is_layout_rtl() ? MouseButton::WHEEL_LEFT : MouseButton::WHEEL_RIGHT)) && !mb->is_command_or_control_pressed()) { if (scrolling_enabled && buttons_visible) { if (missing_right && offset < tabs.size()) { offset++;