From 29ba31f271594d48a7ddb2544d7d83ff56bd279d Mon Sep 17 00:00:00 2001 From: Curtis Wensley Date: Tue, 16 May 2023 16:22:16 -0700 Subject: [PATCH] Mac: Ensure expander is centered in cell --- src/Eto.Mac/Forms/Controls/TreeGridViewHandler.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Eto.Mac/Forms/Controls/TreeGridViewHandler.cs b/src/Eto.Mac/Forms/Controls/TreeGridViewHandler.cs index 68d2111d00..b417dc76a7 100644 --- a/src/Eto.Mac/Forms/Controls/TreeGridViewHandler.cs +++ b/src/Eto.Mac/Forms/Controls/TreeGridViewHandler.cs @@ -535,6 +535,12 @@ public EtoOutlineView(IntPtr handle) : base(handle) { } + public override CGRect FrameOfOutlineCellAtRow(nint row) + { + // this does "nothing" but it does make the outline cell center the disclosure triangle. + return base.FrameOfOutlineCellAtRow(row); + } + #if MACOS_NET public override NSImage DragImageForRows(NSIndexSet dragRows, NSTableColumn[] tableColumns, NSEvent dragEvent, ref CGPoint dragImageOffset) {