From b4672388778f4c89a5cd05d87bb8818fa6d31592 Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Thu, 19 Feb 2015 00:57:31 +0000 Subject: Removed fpgApplication.DefaultFont We really don't need yet another "default font". All references to fpgApplication.DefaultFont has been changed to fpgStyle.DefaultFont - as it should be. --- src/corelib/fpg_base.pas | 2 +- src/corelib/fpg_main.pas | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) (limited to 'src/corelib') diff --git a/src/corelib/fpg_base.pas b/src/corelib/fpg_base.pas index e6e3ab7e..365ca20a 100644 --- a/src/corelib/fpg_base.pas +++ b/src/corelib/fpg_base.pas @@ -1864,7 +1864,7 @@ begin SetColor(clText1); SetTextColor(clText1); - SetFont(fpgApplication.DefaultFont); + SetFont(fpgStyle.DefaultFont); SetLineStyle(0, lsSolid); FBeginDrawCount := 0; diff --git a/src/corelib/fpg_main.pas b/src/corelib/fpg_main.pas index d74a9be4..1bdbff2e 100644 --- a/src/corelib/fpg_main.pas +++ b/src/corelib/fpg_main.pas @@ -275,7 +275,6 @@ type FDisplayParams: string; FScreenWidth: integer; FScreenHeight: integer; - FDefaultFont: TfpgFont; FFontResList: TList; FMessageHookList: TFPList; procedure FreeFontRes(afontres: TfpgFontResource); @@ -297,7 +296,6 @@ type procedure SetMessageHook(AWidget: TObject; const AMsgCode: integer; AListener: TObject); procedure ShowException(E: Exception); procedure UnsetMessageHook(AWidget: TObject; const AMsgCode: integer; AListener: TObject); - property DefaultFont: TfpgFont read FDefaultFont; property HintPause: Integer read FHintPause write SetHintPause; property HintWindow: TfpgWindow read FHintWindow; property ScreenWidth: integer read FScreenWidth; @@ -1384,8 +1382,6 @@ begin TfpgTimer(fpgTimers[i]).Free; fpgTimers.Free; - FDefaultFont.Free; - for i := FFontResList.Count-1 downto 0 do begin TfpgFontResource(FFontResList[i]).Free; @@ -1671,7 +1667,6 @@ end; procedure TfpgApplication.InternalInit; begin - FDefaultFont := GetFont(FPG_DEFAULT_FONT_DESC); fpgInitTimers; fpgNamedFonts := TList.Create; -- cgit v1.2.3-70-g09d2