mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-22 11:20:36 +02:00
published TPanel.Font
git-svn-id: trunk@7871 -
This commit is contained in:
parent
06a1976a71
commit
20f205ab1d
@ -1677,6 +1677,7 @@ type
|
|||||||
protected
|
protected
|
||||||
procedure WMPaint(var Message: TLMPaint); message LM_PAINT;
|
procedure WMPaint(var Message: TLMPaint); message LM_PAINT;
|
||||||
procedure PaintWindow(DC: HDC); override;
|
procedure PaintWindow(DC: HDC); override;
|
||||||
|
procedure FontChanged(Sender: TObject); override;
|
||||||
public
|
public
|
||||||
constructor Create(AOwner: TComponent); override;
|
constructor Create(AOwner: TComponent); override;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
|
@ -80,6 +80,12 @@ begin
|
|||||||
if Assigned(FOnPaint) then FOnPaint(Self);
|
if Assigned(FOnPaint) then FOnPaint(Self);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TCustomControl.FontChanged(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Canvas.Font:=Font;
|
||||||
|
inherited FontChanged(Sender);
|
||||||
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
Method: TCustomControl.LMPaint
|
Method: TCustomControl.LMPaint
|
||||||
Params: Msg: The paint message
|
Params: Msg: The paint message
|
||||||
|
@ -110,6 +110,7 @@ begin
|
|||||||
TS.Layout:= tlCenter;
|
TS.Layout:= tlCenter;
|
||||||
TS.Opaque:= false;
|
TS.Opaque:= false;
|
||||||
TS.Clipping:= false;
|
TS.Clipping:= false;
|
||||||
|
TS.SystemFont:=Canvas.Font.IsDefault;
|
||||||
Canvas.TextRect(ARect,ARect.Left,ARect.Top, Caption, TS);
|
Canvas.TextRect(ARect,ARect.Left,ARect.Top, Caption, TS);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
@ -1751,7 +1751,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
TWSWinControlClass(WidgetSetClass).SetFont(Self, Font);
|
TWSWinControlClass(WidgetSetClass).SetFont(Self, Font);
|
||||||
Exclude(FWinControlFlags,wcfFontChanged);
|
Exclude(FWinControlFlags,wcfFontChanged);
|
||||||
//NotifyControls(CM_ ...);
|
Invalidate;
|
||||||
end else
|
end else
|
||||||
Include(FWinControlFlags,wcfFontChanged);
|
Include(FWinControlFlags,wcfFontChanged);
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user