mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-29 14:31:29 +02:00
win32: group box: highDPI: force reposition of children after font change. Issue #23415
git-svn-id: trunk@54195 -
This commit is contained in:
parent
b4b0cf8831
commit
d45b1fe5cd
@ -2002,6 +2002,7 @@ type
|
||||
procedure DoSendBoundsToInterface; virtual; // called by RealizeBounds
|
||||
procedure RealizeBounds; virtual;// checks for changes and calls DoSendBoundsToInterface
|
||||
procedure RealizeBoundsRecursive; // called by DoAllAutoSize
|
||||
procedure InvalidateBoundsRealized;
|
||||
procedure CreateSubClass(var Params: TCreateParams; ControlClassName: PChar);
|
||||
procedure DoConstraintsChange(Sender: TObject); override;
|
||||
procedure DoSetBounds(ALeft, ATop, AWidth, AHeight: integer); override;
|
||||
|
@ -7846,6 +7846,11 @@ begin
|
||||
inc(FBoundsLockCount);
|
||||
end;
|
||||
|
||||
procedure TWinControl.InvalidateBoundsRealized;
|
||||
begin
|
||||
FBoundsRealized := Rect(0, 0, 0, 0);
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
Method: TControl.EndUpdateBounds
|
||||
Params: None
|
||||
|
@ -58,6 +58,7 @@ type
|
||||
class procedure GetPreferredSize(const AWinControl: TWinControl;
|
||||
var PreferredWidth, PreferredHeight: integer;
|
||||
WithThemeSpace: Boolean); override;
|
||||
class procedure SetFont(const AWinControl: TWinControl; const AFont: TFont); override;
|
||||
end;
|
||||
|
||||
{ TWin32WSGroupBox }
|
||||
@ -344,6 +345,9 @@ const
|
||||
|
||||
{$I win32memostrings.inc}
|
||||
|
||||
type
|
||||
TWinControlAccess = class(TWinControl);
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
Function: ComboBoxWindowProc
|
||||
Params: Window - The window that receives a message
|
||||
@ -612,6 +616,20 @@ begin
|
||||
RecreateWnd(AWinControl);
|
||||
end;
|
||||
|
||||
class procedure TWin32WSCustomGroupBox.SetFont(const AWinControl: TWinControl;
|
||||
const AFont: TFont);
|
||||
var
|
||||
I: Integer;
|
||||
begin
|
||||
TWin32WSWinControl.SetFont(AWinControl, AFont);
|
||||
|
||||
TWinControlAccess(AWinControl).InvalidateBoundsRealized;
|
||||
for I := 0 to AWinControl.ControlCount-1 do
|
||||
if AWinControl.Controls[I] is TWinControl then
|
||||
TWinControlAccess(AWinControl.Controls[I]).InvalidateBoundsRealized;
|
||||
TWinControlAccess(AWinControl).RealizeBoundsRecursive;
|
||||
end;
|
||||
|
||||
class procedure TWin32WSCustomGroupBox.SetText(const AWinControl: TWinControl;
|
||||
const AText: string);
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user