LCL: Remove unused parameters Width and Height from LCLBoundsToWin32Bounds. Issue #35465, patch from Serge Anvarov.

git-svn-id: trunk@61112 -
This commit is contained in:
juha 2019-05-03 14:44:44 +00:00
parent 7de7e2642e
commit 0b9cbf7d7d
7 changed files with 14 additions and 18 deletions

View File

@ -179,8 +179,7 @@ function LCLControlSizeNeedsUpdate(Sender: TWinControl;
function GetLCLClientBoundsOffset(Sender: TObject; var ORect: TRect): boolean; function GetLCLClientBoundsOffset(Sender: TObject; var ORect: TRect): boolean;
function GetLCLClientBoundsOffset(Handle: TWindowInfo; var Rect: TRect): boolean; function GetLCLClientBoundsOffset(Handle: TWindowInfo; var Rect: TRect): boolean;
procedure LCLBoundsToWin32Bounds(Sender: TObject; procedure LCLBoundsToWin32Bounds(Sender: TObject; var Left, Top: Integer);
var Left, Top, Width, Height: Integer);
procedure LCLFormSizeToWin32Size(Form: TCustomForm; var AWidth, AHeight: Integer); procedure LCLFormSizeToWin32Size(Form: TCustomForm; var AWidth, AHeight: Integer);
procedure GetWin32ControlPos(Window, Parent: HWND; var Left, Top: integer); procedure GetWin32ControlPos(Window, Parent: HWND; var Left, Top: integer);
@ -1305,8 +1304,7 @@ begin
Result:=GetLCLClientBoundsOffset(OwnerObject, Rect); Result:=GetLCLClientBoundsOffset(OwnerObject, Rect);
end; end;
procedure LCLBoundsToWin32Bounds(Sender: TObject; procedure LCLBoundsToWin32Bounds(Sender: TObject; var Left, Top: Integer);
var Left, Top, Width, Height: Integer);
var var
ORect: TRect; ORect: TRect;
Begin Begin

View File

@ -143,7 +143,7 @@ begin
IntfTop := ATop; IntfTop := ATop;
IntfWidth := AWidth; IntfWidth := AWidth;
IntfHeight := AHeight; IntfHeight := AHeight;
LCLBoundsToWin32Bounds(AWinControl, IntfLeft, IntfTop, IntfWidth, IntfHeight); LCLBoundsToWin32Bounds(AWinControl, IntfLeft, IntfTop);
{$IFDEF VerboseCDForms} {$IFDEF VerboseCDForms}
DebugLn('[TCDWSCustomForm.WSWinControl_SetBounds] A ', dbgsName(AWinControl), DebugLn('[TCDWSCustomForm.WSWinControl_SetBounds] A ', dbgsName(AWinControl),
' LCL=',Format('%d, %d, %d, %d', [ALeft,ATop,AWidth,AHeight]), ' LCL=',Format('%d, %d, %d, %d', [ALeft,ATop,AWidth,AHeight]),
@ -176,7 +176,7 @@ var
begin begin
IntfLeft := ALeft; IntfTop := ATop; IntfLeft := ALeft; IntfTop := ATop;
IntfWidth := AWidth; IntfHeight := AHeight; IntfWidth := AWidth; IntfHeight := AHeight;
LCLBoundsToWin32Bounds(AWinControl, IntfLeft, IntfTop, IntfWidth, IntfHeight); LCLBoundsToWin32Bounds(AWinControl, IntfLeft, IntfTop);
{$IFDEF VerboseSizeMsg} {$IFDEF VerboseSizeMsg}
Debugln('TWinCEWSWinControl.ResizeWindow A ',AWinControl.Name,':',AWinControl.ClassName, Debugln('TWinCEWSWinControl.ResizeWindow A ',AWinControl.Name,':',AWinControl.ClassName,
' LCL=',dbgs(ALeft),',',dbgs(ATop),',',dbgs(AWidth)+','+dbgs(AHeight), ' LCL=',dbgs(ALeft),',',dbgs(ATop),',',dbgs(AWidth)+','+dbgs(AHeight),
@ -258,7 +258,7 @@ begin
Width := AParams.Width; Width := AParams.Width;
Height := AParams.Height; Height := AParams.Height;
LCLBoundsToWin32Bounds(AWinControl, Left, Top, Width, Height); LCLBoundsToWin32Bounds(AWinControl, Left, Top);
// if AWinControl is TCustomControl then // if AWinControl is TCustomControl then
// if TCustomControl(AWinControl).BorderStyle = bsSingle then // if TCustomControl(AWinControl).BorderStyle = bsSingle then
// FlagsEx := FlagsEx or WS_EX_CLIENTEDGE; // FlagsEx := FlagsEx or WS_EX_CLIENTEDGE;
@ -388,7 +388,7 @@ begin
Width := AParams.Width; Width := AParams.Width;
Height := AParams.Height; Height := AParams.Height;
LCLBoundsToWin32Bounds(AWinControl, Left, Top, Width, Height); LCLBoundsToWin32Bounds(AWinControl, Left, Top);
// if AWinControl is TCustomControl then // if AWinControl is TCustomControl then
// if TCustomControl(AWinControl).BorderStyle = bsSingle then // if TCustomControl(AWinControl).BorderStyle = bsSingle then
// FlagsEx := FlagsEx or WS_EX_CLIENTEDGE; // FlagsEx := FlagsEx or WS_EX_CLIENTEDGE;

View File

@ -84,7 +84,7 @@ function ObjectToHWND(const AObject: TObject): HWND;
function LCLControlSizeNeedsUpdate(Sender: TWinControl; SendSizeMsgOnDiff: boolean): boolean; function LCLControlSizeNeedsUpdate(Sender: TWinControl; SendSizeMsgOnDiff: boolean): boolean;
function GetLCLClientBoundsOffset(Sender: TObject; out ORect: TRect): boolean; function GetLCLClientBoundsOffset(Sender: TObject; out ORect: TRect): boolean;
function GetLCLClientBoundsOffset(Handle: HWnd; out Rect: TRect): boolean; function GetLCLClientBoundsOffset(Handle: HWnd; out Rect: TRect): boolean;
procedure LCLBoundsToWin32Bounds(Sender: TObject; var Left, Top, Width, Height: Integer); procedure LCLBoundsToWin32Bounds(Sender: TObject; var Left, Top: Integer);
procedure Win32PosToLCLPos(Sender: TObject; var Left, Top: SmallInt); procedure Win32PosToLCLPos(Sender: TObject; var Left, Top: SmallInt);
procedure GetWin32ControlPos(Window, Parent: HWND; var Left, Top: integer); procedure GetWin32ControlPos(Window, Parent: HWND; var Left, Top: integer);
function GetWin32NativeDoubleBuffered(Sender: TWinControl): boolean; function GetWin32NativeDoubleBuffered(Sender: TWinControl): boolean;
@ -753,8 +753,7 @@ begin
Result := GetLCLClientBoundsOffset(OwnerObject, Rect); Result := GetLCLClientBoundsOffset(OwnerObject, Rect);
end; end;
procedure LCLBoundsToWin32Bounds(Sender: TObject; procedure LCLBoundsToWin32Bounds(Sender: TObject; var Left, Top: Integer);
var Left, Top, Width, Height: Integer);
var var
ORect: TRect; ORect: TRect;
begin begin

View File

@ -161,7 +161,7 @@ begin
Width := CreateParams.Width; Width := CreateParams.Width;
Height := CreateParams.Height; Height := CreateParams.Height;
LCLBoundsToWin32Bounds(AWinControl, Left, Top, Width, Height); LCLBoundsToWin32Bounds(AWinControl, Left, Top);
SetStdBiDiModeParams(AWinControl, Params); SetStdBiDiModeParams(AWinControl, Params);
if not (csDesigning in AWinControl.ComponentState) and not AWinControl.IsEnabled then if not (csDesigning in AWinControl.ComponentState) and not AWinControl.IsEnabled then
@ -446,7 +446,7 @@ begin
IntfTop := ATop; IntfTop := ATop;
IntfWidth := AWidth; IntfWidth := AWidth;
IntfHeight := AHeight; IntfHeight := AHeight;
LCLBoundsToWin32Bounds(AWinControl, IntfLeft, IntfTop, IntfWidth, IntfHeight); LCLBoundsToWin32Bounds(AWinControl, IntfLeft, IntfTop);
{$IFDEF VerboseSizeMsg} {$IFDEF VerboseSizeMsg}
DebugLn('TWin32WSWinControl.ResizeWindow A ', dbgsName(AWinControl), DebugLn('TWin32WSWinControl.ResizeWindow A ', dbgsName(AWinControl),
' LCL=',Format('%d, %d, %d, %d', [ALeft,ATop,AWidth,AHeight]), ' LCL=',Format('%d, %d, %d, %d', [ALeft,ATop,AWidth,AHeight]),

View File

@ -314,7 +314,7 @@ begin
Top := FSender.Top; Top := FSender.Top;
Width := FSender.Width; Width := FSender.Width;
Height := ComboHeight; Height := ComboHeight;
LCLBoundsToWin32Bounds(FSender, Left, Top, Width, Height); LCLBoundsToWin32Bounds(FSender, Left, Top);
MoveWindow(FSender.Handle, Left, Top, Width, Height, true); MoveWindow(FSender.Handle, Left, Top, Width, Height, true);
LCLControlSizeNeedsUpdate(FSender, true); LCLControlSizeNeedsUpdate(FSender, true);
end; end;

View File

@ -75,8 +75,7 @@ function LCLControlSizeNeedsUpdate(Sender: TWinControl;
function GetLCLClientBoundsOffset(Sender: TObject; var ORect: TRect): boolean; function GetLCLClientBoundsOffset(Sender: TObject; var ORect: TRect): boolean;
function GetLCLClientBoundsOffset(Handle: HWnd; var Rect: TRect): boolean; function GetLCLClientBoundsOffset(Handle: HWnd; var Rect: TRect): boolean;
procedure LCLBoundsToWin32Bounds(Sender: TObject; procedure LCLBoundsToWin32Bounds(Sender: TObject; var Left, Top: Integer);
var Left, Top, Width, Height: Integer);
procedure LCLFormSizeToWin32Size(Form: TCustomForm; var AWidth, AHeight: Integer); procedure LCLFormSizeToWin32Size(Form: TCustomForm; var AWidth, AHeight: Integer);
procedure GetWin32ControlPos(Window, Parent: HWND; var Left, Top: integer); procedure GetWin32ControlPos(Window, Parent: HWND; var Left, Top: integer);

View File

@ -164,7 +164,7 @@ begin
Width := CreateParams.Width; Width := CreateParams.Width;
Height := CreateParams.Height; Height := CreateParams.Height;
LCLBoundsToWin32Bounds(AWinControl, Left, Top, Width, Height); LCLBoundsToWin32Bounds(AWinControl, Left, Top);
if AWinControl is TCustomControl then if AWinControl is TCustomControl then
if TCustomControl(AWinControl).BorderStyle = bsSingle then if TCustomControl(AWinControl).BorderStyle = bsSingle then
FlagsEx := FlagsEx or WS_EX_CLIENTEDGE; FlagsEx := FlagsEx or WS_EX_CLIENTEDGE;
@ -392,7 +392,7 @@ var
begin begin
IntfLeft := ALeft; IntfTop := ATop; IntfLeft := ALeft; IntfTop := ATop;
IntfWidth := AWidth; IntfHeight := AHeight; IntfWidth := AWidth; IntfHeight := AHeight;
LCLBoundsToWin32Bounds(AWinControl, IntfLeft, IntfTop, IntfWidth, IntfHeight); LCLBoundsToWin32Bounds(AWinControl, IntfLeft, IntfTop);
{$IFDEF VerboseSizeMsg} {$IFDEF VerboseSizeMsg}
Debugln('TWinCEWSWinControl.ResizeWindow A ',AWinControl.Name,':',AWinControl.ClassName, Debugln('TWinCEWSWinControl.ResizeWindow A ',AWinControl.Name,':',AWinControl.ClassName,
' LCL=',dbgs(ALeft),',',dbgs(ATop),',',dbgs(AWidth)+','+dbgs(AHeight), ' LCL=',dbgs(ALeft),',',dbgs(ATop),',',dbgs(AWidth)+','+dbgs(AHeight),