mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-26 20:20:47 +02:00
LCL: additional fix to TWinControl.GetClientRect wcfBoundsRealized (DockedFormEditor issue), issue #40052. Patch by rich2014.
This commit is contained in:
parent
822f606e97
commit
5f76b3e31c
@ -4058,12 +4058,16 @@ begin
|
|||||||
// they will probably change
|
// they will probably change
|
||||||
// to avoid resizes it is better use the defaults
|
// to avoid resizes it is better use the defaults
|
||||||
GetDefaults(Result);
|
GetDefaults(Result);
|
||||||
end else begin
|
end else
|
||||||
|
if not (self is TCustomForm) then
|
||||||
|
begin
|
||||||
// -> adjust client rect based on LCL bounds
|
// -> adjust client rect based on LCL bounds
|
||||||
// for example: if the Width in LCL differ from the Width of the Interface
|
// for example: if the Width in LCL differ from the Width of the Interface
|
||||||
// object, then adjust the clientwidth accordingly
|
// object, then adjust the clientwidth accordingly
|
||||||
// this often anticipates later LM_SIZE messages from the interface
|
// this often anticipates later LM_SIZE messages from the interface
|
||||||
// and reduces resizes
|
// and reduces resizes
|
||||||
|
// BUT: Do this only when not a form. Form has its own clientrect specification:
|
||||||
|
// https://wiki.lazarus.freepascal.org/Lazarus_FAQ#Why_are_TForm.ClientWidth.2FClientHeight_the_same_as_TForm.Width.2FHeight
|
||||||
inc(Result.Right,Width-InterfaceWidth);
|
inc(Result.Right,Width-InterfaceWidth);
|
||||||
inc(Result.Bottom,Height-InterfaceHeight);
|
inc(Result.Bottom,Height-InterfaceHeight);
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user