mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-08 03:17:19 +01:00
win32: move last notebook related message handling to own window proc
git-svn-id: trunk@30196 -
This commit is contained in:
parent
902d2755bb
commit
9fadfea500
@ -2298,15 +2298,7 @@ begin
|
||||
if (lWinControl.Width <> Width) or
|
||||
(lWinControl.Height <> Height) or
|
||||
lWinControl.ClientRectNeedsInterfaceUpdate then
|
||||
begin
|
||||
lWinControl.DoAdjustClientRectChange;
|
||||
if (lWinControl is TCustomPage) and (lWinControl.Parent is TCustomNotebook) then
|
||||
begin
|
||||
// the TCustomPage size is the ClientRect size of the parent
|
||||
// => invalidate the Parent.ClientRect
|
||||
lWinControl.Parent.InvalidateClientRectCache(false);
|
||||
end;
|
||||
end
|
||||
lWinControl.DoAdjustClientRectChange
|
||||
else
|
||||
// If we get form size message then we probably changed it state
|
||||
// (minimized/maximized -> normal). Form adjust its clientrect in the
|
||||
|
||||
@ -288,11 +288,25 @@ end;
|
||||
|
||||
function PageWindowProc(Window: HWnd; Msg: UInt; WParam: Windows.WParam;
|
||||
LParam: Windows.LParam): LResult; stdcall;
|
||||
var
|
||||
Info: PWin32WindowInfo;
|
||||
begin
|
||||
if Msg = WM_THEMECHANGED then
|
||||
begin
|
||||
ThemeServices.UpdateThemes;
|
||||
TWin32WSCustomPage.ThemeChange(Window);
|
||||
case Msg of
|
||||
WM_THEMECHANGED:
|
||||
begin
|
||||
ThemeServices.UpdateThemes;
|
||||
TWin32WSCustomPage.ThemeChange(Window);
|
||||
end;
|
||||
WM_SIZE:
|
||||
begin
|
||||
Info := GetWin32WindowInfo(Window);
|
||||
if (Info^.WinControl.Parent is TCustomNotebook) then
|
||||
begin
|
||||
// the TCustomPage size is the ClientRect size of the parent
|
||||
// => invalidate the Parent.ClientRect
|
||||
Info^.WinControl.Parent.InvalidateClientRectCache(false);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
Result := WindowProc(Window, Msg, WParam, LParam);
|
||||
end;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user