UPD: fine-tune the position of the Inplace Rename Button on macOS

This commit is contained in:
rich2014 2026-05-22 11:33:26 +08:00
commit 617493ec78
3 changed files with 15 additions and 0 deletions

View file

@ -587,6 +587,11 @@ begin
if gInplaceRenameButton and (ARect.Right + edtRename.ButtonWidth < dgPanel.ClientWidth) then
Inc(ARect.Right, edtRename.ButtonWidth);
{$IFDEF LCLCOCOA}
Dec( ARect.Top, 1 );
Dec( ARect.Left, 2 );
{$ENDIF}
edtRename.SetBounds(ARect.Left, ARect.Top, ARect.Right - ARect.Left, ARect.Bottom - ARect.Top);
end;

View file

@ -522,6 +522,11 @@ begin
Dec(ARect.Right, 1);
{$IFDEF LCLCOCOA}
Dec( ARect.Top, 1 );
Dec( ARect.Left, 2 );
{$ENDIF}
edtRename.SetBounds(ARect.Left, ARect.Top, ARect.Width, ARect.Height);
end;

View file

@ -806,6 +806,11 @@ begin
if gInplaceRenameButton and (ARect.Right + edtRename.ButtonWidth < dgPanel.ClientWidth) then
Inc(ARect.Right, edtRename.ButtonWidth);
{$IFDEF LCLCOCOA}
Dec( ARect.Left, 2 );
Inc( ARect.Top, 2 );
{$ENDIF}
edtRename.SetBounds(ARect.Left, ARect.Top, ARect.Right - ARect.Left, ARect.Bottom - ARect.Top);
end;