Merge pull request #110250 from YeldhamDev/i_just_cant_keep_focused

Hide `Control` focus when given via mouse input
This commit is contained in:
Thaddeus Crews
2025-09-22 13:28:44 -05:00
53 changed files with 229 additions and 105 deletions

View File

@ -303,7 +303,7 @@ void AnimationBezierTrackEdit::_notification(int p_what) {
const int h_separation = get_theme_constant(SNAME("h_separation"), SNAME("AnimationBezierTrackEdit"));
const int v_separation = get_theme_constant(SNAME("h_separation"), SNAME("AnimationBezierTrackEdit"));
if (has_focus()) {
if (has_focus(true)) {
draw_rect(Rect2(Point2(), get_size()), focus_color, false, Math::round(EDSCALE));
}

View File

@ -448,7 +448,7 @@ void AnimationNodeBlendSpace2DEditor::_blend_space_draw() {
Size2 s = blend_space_draw->get_size();
if (blend_space_draw->has_focus()) {
if (blend_space_draw->has_focus(true)) {
Color color = get_theme_color(SNAME("accent_color"), EditorStringName(Editor));
blend_space_draw->draw_rect(Rect2(Point2(), s), color, false);
}

View File

@ -952,7 +952,7 @@ void AnimationNodeStateMachineEditor::_state_machine_draw() {
travel_path = playback->get_travel_path();
}
if (state_machine_draw->has_focus()) {
if (state_machine_draw->has_focus(true)) {
state_machine_draw->draw_rect(Rect2(Point2(), state_machine_draw->get_size()), theme_cache.focus_color, false);
}
int sep = 3 * EDSCALE;