summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graeme@mastermaths.co.za>2012-11-21 15:34:46 +0000
committerGraeme Geldenhuys <graeme@mastermaths.co.za>2012-11-21 15:34:46 +0000
commitc2722b4626d6f395bfb42078fd9574c418aef4f4 (patch)
treea46591195bd350fb7cf33e4c9cfd4155a5870bc3
parentea094f1006d0af479e6e0d78aabef66277491202 (diff)
downloadfpGUI-c2722b4626d6f395bfb42078fd9574c418aef4f4.tar.xz
richtext:: Incorrect "normal font" was assigned as default style.
Very weird, there was even a code comment saying that it was wrong!! The constructor of TRichTextSettings already sets the "normal font". So by ignoring the ASettings parameter, the end-user couldn't assign a new normal font values. Anyway, this is now fixed.
-rw-r--r--docview/components/richtext/RichTextStyleUnit.pas3
1 files changed, 1 insertions, 2 deletions
diff --git a/docview/components/richtext/RichTextStyleUnit.pas b/docview/components/richtext/RichTextStyleUnit.pas
index cf5e8a7e..7effc5ee 100644
--- a/docview/components/richtext/RichTextStyleUnit.pas
+++ b/docview/components/richtext/RichTextStyleUnit.pas
@@ -329,8 +329,7 @@ end;
function GetDefaultStyle( const ASettings: TRichTextSettings ): TTextDrawStyle;
begin
FillChar(Result, SizeOf(TTextDrawStyle), 0);
- { Note: this references the user Settings and not the parameter ASettings }
- Result.FontNameSize := Settings.NormalFontDesc;
+ Result.FontNameSize := ASettings.NormalFont.FontDesc;
Result.FontAttributes := [];
Result.Alignment := ASettings.FDefaultAlignment;
Result.Wrap := ASettings.FDefaultWrap;