Repository: godotengine/godot (language: cpp)

Issue:
Inspector Section doesn't always update hover state
### Tested versions

4.5 master

### System information

Windows 10

### Issue description

The hover state on inspector section headers doesn't update when cursor moves in or out of the header rect. It only updates when leaving or entering the entire Control

### Steps to reproduce

Create any node. Expand an inspector section. Move the cursor in and out of the header rect.

https://github.com/user-attachments/assets/b4e0a0fb-9cb2-4e40-8069-f1975cb71dd7

### Minimal reproduction project (MRP)

N/A


Discussion / hints:

Fix patch:
diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp
index dd0030d134f6..0a03583b4bf9 100644
--- a/editor/editor_inspector.cpp
+++ b/editor/editor_inspector.cpp
@@ -1888,6 +1888,15 @@ void EditorInspectorSection::gui_input(const Ref<InputEvent> &p_event) {
 	} else if (mb.is_valid() && !mb->is_pressed()) {
 		queue_redraw();
 	}
+
+	Ref<InputEventMouseMotion> mm = p_event;
+	if (mm.is_valid()) {
+		int header_height = _get_header_height();
+		Vector2 previous = mm->get_position() - mm->get_relative();
+		if ((mm->get_position().y >= header_height) != (previous.y >= header_height)) {
+			queue_redraw();
+		}
+	}
 }
 
 String EditorInspectorSection::get_section() const {


Test patch: