From 99caa084fcd8892cbf4b93693b98ea96dbd27e92 Mon Sep 17 00:00:00 2001 From: Ondrej Pokorny Date: Sun, 18 Dec 2022 11:18:03 +0100 Subject: [PATCH] Revert TFontStyles to the original size --- components/lazreport/source/fr3tolrf.pas | 2 +- components/virtualtreeview/laz.virtualtrees.pas | 8 -------- lcl/grids.pas | 8 -------- 3 files changed, 1 insertion(+), 17 deletions(-) diff --git a/components/lazreport/source/fr3tolrf.pas b/components/lazreport/source/fr3tolrf.pas index 2fc38da27e..12ce82ce13 100644 --- a/components/lazreport/source/fr3tolrf.pas +++ b/components/lazreport/source/fr3tolrf.pas @@ -126,7 +126,7 @@ end; function DelphiIntToFpcFontStyle(aStyle: Integer): TFontStyles; begin - result := TFontStyles(Byte(aStyle)); + result := TFontStyles(aStyle); end; function DelphiIntToFPCFrameBorders(aFrameTyp: Integer): TfrFrameBorders; diff --git a/components/virtualtreeview/laz.virtualtrees.pas b/components/virtualtreeview/laz.virtualtrees.pas index 506a7239f5..c933931b20 100644 --- a/components/virtualtreeview/laz.virtualtrees.pas +++ b/components/virtualtreeview/laz.virtualtrees.pas @@ -11757,11 +11757,7 @@ begin ReadBuffer(Dummy, SizeOf(Dummy)); Pitch := TFontPitch(Dummy); ReadBuffer(Dummy, SizeOf(Dummy)); - {$IF FPC_FULLVERSION>30300} - Style := TFontStyles(Byte(Dummy)); - {$ELSE} Style := TFontStyles(LongWord(Dummy)); - {$ENDIF} end; // LCL port started with header stream version 6 so no need to do the check here // Read data introduced by stream version 1+. @@ -12034,11 +12030,7 @@ begin WriteBuffer(PAnsiChar(Tmp)^, Dummy); Dummy := Ord(Pitch); WriteBuffer(Dummy, SizeOf(Dummy)); - {$IF FPC_FULLVERSION>30300} - Dummy := Byte(Style); - {$ELSE} Dummy := Integer(Style); - {$ENDIF} WriteBuffer(Dummy, SizeOf(Dummy)); end; diff --git a/lcl/grids.pas b/lcl/grids.pas index 8dda94a14d..956bb0e194 100644 --- a/lcl/grids.pas +++ b/lcl/grids.pas @@ -2136,11 +2136,7 @@ begin cfg.SetValue(AKey + '/name/value', AFont.Name); cfg.SetValue(AKey + '/size/value', AFont.Size); cfg.SetValue(AKey + '/color/value', ColorToString(AFont.Color)); - {$IF FPC_FULLVERSION>=30300} - cfg.SetValue(AKey + '/style/value', Byte(AFont.Style)); - {$ELSE} cfg.SetValue(AKey + '/style/value', Integer(AFont.Style)); - {$ENDIF} end; procedure CfgGetFontValue(cfg: TXMLConfig; AKey: WideString; AFont: TFont); @@ -2148,11 +2144,7 @@ begin AFont.Name := cfg.GetValue(AKey + '/name/value', 'default'); AFont.Size := cfg.GetValue(AKey + '/size/value', 0); AFont.Color:= StringToColor(cfg.GetValue(AKey + '/color/value', 'clWindowText')); - {$IF FPC_FULLVERSION>=30300} - AFont.Style:= TFontStyles(Byte(cfg.GetValue(AKey + '/style/value', 0))); - {$ELSE} AFont.Style:= TFontStyles(cfg.GetValue(AKey + '/style/value', 0)); - {$ENDIF} end; // Draws a dotted rectangle by drawing each enabled side. By default all sides are