Skip to content

Commit

Permalink
Fixed window close button passing input upwards (#5038)
Browse files Browse the repository at this point in the history
which caused for example the editor to try to place something
  • Loading branch information
hhyyrylainen committed Apr 16, 2024
1 parent bdff5a6 commit ad47ba8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/gui_common/dialogs/CustomWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ public override void _GuiInput(InputEvent @event)
}

/// <summary>
/// Overrides the minimum size to account for default elements (e.g title, close button, margin) rect size
/// Overrides the minimum size to account for default elements (e.g. title, close button, margin) rect size
/// and for the other custom added contents on the window.
/// </summary>
public override Vector2 _GetMinimumSize()
Expand Down Expand Up @@ -678,7 +678,8 @@ private void SetupCloseButton()
{
StretchMode = TextureButton.StretchModeEnum.KeepAspectCentered,
CustomMinimumSize = new Vector2(14, 14),
MouseFilter = MouseFilterEnum.Pass,
MouseFilter = MouseFilterEnum.Stop,
MouseForcePassScrollEvents = false,
};

closeButton.SetAnchorsPreset(LayoutPreset.TopRight);
Expand Down

0 comments on commit ad47ba8

Please sign in to comment.