From d687f375bbc9a10ec4dbd94147670430dde73417 Mon Sep 17 00:00:00 2001 From: Giganzo <158825920+Giganzo@users.noreply.github.com> Date: Fri, 14 Feb 2025 22:22:49 +0100 Subject: [PATCH] Fix Tree buttons jiggle on horizontal scrolling --- scene/gui/tree.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp index 81a7037878..d9a4dd2fe1 100644 --- a/scene/gui/tree.cpp +++ b/scene/gui/tree.cpp @@ -2184,7 +2184,7 @@ int Tree::draw_item(const Point2i &p_pos, const Point2 &p_draw_ofs, const Size2 buttons_width += button_texture->get_size().width + theme_cache.button_pressed->get_minimum_size().width + theme_cache.button_margin; } - int total_ofs = ofs - theme_cache.offset.x; + double total_ofs = ofs - theme_cache.offset.x; // If part of the column is beyond the right side of the control due to scrolling, clamp the label width // so that all buttons attached to the cell remain within view.