UPD: simplify vert alignment in edtRename in FileView in Lazarus 4.99

This commit is contained in:
rich2014 2026-05-22 10:45:29 +08:00
commit 4843768305

View file

@ -70,9 +70,6 @@ type
{$IF (DEFINED(LCLQT) or DEFINED(LCLQT5) or DEFINED(LCLQT6)) and (LCL_FULLVERSION < 3020000)}
procedure Hack(Data: PtrInt);
procedure EditExit; override;
{$ELSEIF DEFINED(LCLCOCOA)}
procedure CreateHandle; override;
procedure ChildHandlesCreated; override;
{$ENDIF}
function CalcButtonVisible: Boolean; override;
function GetDefaultGlyphName: String; override;
@ -243,8 +240,6 @@ uses
{$IF DEFINED(LCLGTK2)}
Gtk2Proc, // for ReleaseMouseCapture
GTK2Globals, // for DblClickTime
{$ELSEIF DEFINED(LCLCOCOA)}
CocoaConfig,
{$ENDIF}
LCLIntf, LCLProc, LazUTF8, Forms, Dialogs, Buttons, DCOSUtils, DCStrUtils,
fMain, uShowMsg, uLng, uFileProperty, uFileSourceOperationTypes,
@ -315,24 +310,6 @@ begin
end;
{$ENDIF}
{$IFDEF LCLCOCOA}
procedure TEditButtonEx.CreateHandle;
begin
{$IF (LCL_FULLVERSION >= 4990000)}
CocoaConfigEdit.vertAlignCenter:= True;
{$ENDIF}
inherited CreateHandle;
end;
procedure TEditButtonEx.ChildHandlesCreated;
begin
inherited;
{$IF (LCL_FULLVERSION >= 4990000)}
CocoaConfigEdit.vertAlignCenter:= False;
{$ENDIF}
end;
{$ENDIF}
function TEditButtonEx.GetDefaultGlyphName: String;
begin
Result:= BitBtnResNames[idButtonOk];
@ -545,6 +522,9 @@ begin
edtRename.Visible := False;
edtRename.TabStop := False;
edtRename.AutoSize := False;
{$IFDEF LCL_VER_499}
edtRename.Edit.VerticalAlignment:= taVerticalCenter;
{$ENDIF}
{$IFDEF LCLWIN32}
edtRename.onKeyDown:=@edtRenameKeyDown;
{$ENDIF}