Repository: godotengine/godot (language: cpp)

Issue:
TreeItem button tooltip text trigger area is shifted to the right
### Tested versions

- v4.2.2.stable.official [15073afe3] **works**
- v4.3.dev1.official [9d1cbab1c] **works**
- v4.3.dev2.official [352434668] **works**
- v4.3.dev3.official [36e943b6b] **works**
- v4.3.dev4.official [df78c0636] **works**
- v4.3.dev5.official [89f70e98d] **works**
- v4.3.dev6.official [89850d553] **fails**
- v4.3.beta1.official [a4f2ea91a] **fails**
- v4.3.stable.official [77dcf97d8] **fails**
- v4.4.beta2.official [a013481b0] **fails**

### System information

Godot v4.4.beta2 - Windows 11 (build 26100) - Multi-window, 2 monitors - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1080 Ti (NVIDIA; 32.0.15.6614) - AMD Ryzen 9 7900X 12-Core Processor (24 threads)

### Issue description

When adding buttons to a tree with tooltips, the tooltip should show up. Under specific circumstanced this will not happen. This is a regression since `v4.3.dev6`.

I have multiple columns in a tree, with many columns and one last column with buttons. The button column is set to not expanding. The button have all tooltips set. The tooltips trigger area are all shifted to the right, the most left button will show up on the next button or only after half of the button. Smaller buttons will increase this problem.

If you take a look at the next image, i marked the area in yellow where the tooltip will not show up.

![Image](https://github.com/user-attachments/assets/f2bdf782-7231-4659-a5cf-6a6205a32343)

### Steps to reproduce

Just hover over the buttons, from left to right with the mouse. On the first and third tree the tooltip will show up later (more to the right).

### Minimal reproduction project (MRP)

[tempgodot.zip](https://github.com/user-attachments/files/18660600/tempgodot.zip)


Discussion / hints:
Might be related: https://github.com/godotengine/godot/issues/79629
I'll bisect this one.
Sounds related to (that's a newer feature than 4.3 but has some similar observations):
* https://github.com/godotengine/godot/issues/102194
Bisected to #90839, @timothyqiu

![Image](https://github.com/user-attachments/assets/71566866-85af-4a25-81cb-0d2bc9fa53b7)

Fix patch:
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp
index 329c6f3da313..d6bd745bdd5a 100644
--- a/scene/gui/tree.cpp
+++ b/scene/gui/tree.cpp
@@ -5629,7 +5629,7 @@ void Tree::_find_button_at_pos(const Point2 &p_pos, TreeItem *&r_item, int &r_co
 	}
 
 	for (int i = 0; i < col; i++) {
-		const int col_w = get_column_width(i) + theme_cache.h_separation;
+		const int col_w = get_column_width(i);
 		pos.x -= col_w;
 		x_limit -= col_w;
 	}


Test patch: