From 421ed507d126c7ef4f4b44c94a4f7e9487d970f1 Mon Sep 17 00:00:00 2001 From: Curtis Wensley Date: Tue, 6 Jun 2023 15:24:11 -0700 Subject: [PATCH] Mac: Ensure TableLayout updates when resized --- src/Eto.Mac/Forms/TableLayoutHandler.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/Eto.Mac/Forms/TableLayoutHandler.cs b/src/Eto.Mac/Forms/TableLayoutHandler.cs index c2e3bcd144..a38c3b9825 100644 --- a/src/Eto.Mac/Forms/TableLayoutHandler.cs +++ b/src/Eto.Mac/Forms/TableLayoutHandler.cs @@ -401,5 +401,17 @@ public bool GetRowScale(int row) { return yscaling[row]; } + + protected override void Initialize() + { + base.Initialize(); + HandleEvent(Eto.Forms.Control.SizeChangedEvent); + } + + public override void OnSizeChanged(EventArgs e) + { + base.OnSizeChanged(e); + Control.NeedsLayout = true; + } } }