mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 03:56:12 +02:00
Revert TFontStyles to the original size
This commit is contained in:
parent
fe6b88d8da
commit
99caa084fc
@ -126,7 +126,7 @@ end;
|
||||
|
||||
function DelphiIntToFpcFontStyle(aStyle: Integer): TFontStyles;
|
||||
begin
|
||||
result := TFontStyles(Byte(aStyle));
|
||||
result := TFontStyles(aStyle);
|
||||
end;
|
||||
|
||||
function DelphiIntToFPCFrameBorders(aFrameTyp: Integer): TfrFrameBorders;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user