mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-05 12:57:14 +01:00
lcl: notify controls using message on FontChanged, and ParentFontChanged for delphi compatibility
git-svn-id: trunk@22196 -
This commit is contained in:
parent
709c5a4bfe
commit
82ae075ca3
@ -276,6 +276,7 @@ procedure TControl.FontChanged(Sender: TObject);
|
||||
begin
|
||||
ParentFont := False;
|
||||
Invalidate;
|
||||
Perform(CM_FONTCHANGED, 0, 0);
|
||||
end;
|
||||
|
||||
procedure TControl.ParentFontChanged;
|
||||
@ -285,8 +286,9 @@ begin
|
||||
if FParentFont then
|
||||
begin
|
||||
Font := FParent.Font;
|
||||
FParentFont := true;
|
||||
FParentFont := True;
|
||||
end;
|
||||
Perform(CM_PARENTFONTCHANGED, 0, 0);
|
||||
end;
|
||||
|
||||
procedure TControl.SetAction(Value: TBasicAction);
|
||||
|
||||
@ -373,9 +373,13 @@ begin
|
||||
begin
|
||||
while PeekMessage(AMessage, HWnd(nil), 0, 0, PM_REMOVE) do
|
||||
begin
|
||||
if AMessage.message = WM_QUIT then
|
||||
begin
|
||||
PostQuitMessage(AMessage.wParam);
|
||||
break;
|
||||
end;
|
||||
AccelTable := GetWin32WindowInfo(AMessage.HWnd)^.Accel;
|
||||
if (AccelTable = HACCEL(nil))
|
||||
or (TranslateAccelerator(AMessage.HWnd, AccelTable, @AMessage) = 0) then
|
||||
if (AccelTable = HACCEL(nil)) or (TranslateAccelerator(AMessage.HWnd, AccelTable, @AMessage) = 0) then
|
||||
begin
|
||||
TranslateMessage(@AMessage);
|
||||
{$IFDEF WindowsUnicodeSupport}
|
||||
|
||||
@ -242,7 +242,7 @@ const
|
||||
CM_DIALOGKEY = CM_BASE + 5;
|
||||
CM_DIALOGCHAR = CM_BASE + 6;
|
||||
CM_FOCUSCHANGED = CM_BASE + 7;
|
||||
//CM_PARENTFONTCHANGED = CM_BASE + 8; // LCL doesn't send or receive
|
||||
CM_PARENTFONTCHANGED = CM_BASE + 8;
|
||||
CM_PARENTCOLORCHANGED = CM_BASE + 9;
|
||||
CM_HITTEST = CM_BASE + 10;
|
||||
CM_VISIBLECHANGED = CM_BASE + 11;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user