summaryrefslogtreecommitdiff
path: root/docview/components/richtext
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graeme@mastermaths.co.za>2010-09-30 16:24:34 +0200
committerGraeme Geldenhuys <graeme@mastermaths.co.za>2010-09-30 16:24:34 +0200
commite8820cf9945b9ac0546f8d1cac361336f69c9d27 (patch)
treea780811e045533aebd37b64c1cff55957dd109e7 /docview/components/richtext
parentca40ae0d912ea60e8da09cef4a3daf5b01b1c37a (diff)
downloadfpGUI-e8820cf9945b9ac0546f8d1cac361336f69c9d27.tar.xz
docview: minor code formatting
Diffstat (limited to 'docview/components/richtext')
-rw-r--r--docview/components/richtext/RichTextLayoutUnit.pas13
1 files changed, 6 insertions, 7 deletions
diff --git a/docview/components/richtext/RichTextLayoutUnit.pas b/docview/components/richtext/RichTextLayoutUnit.pas
index 822e8c42..9b684349 100644
--- a/docview/components/richtext/RichTextLayoutUnit.pas
+++ b/docview/components/richtext/RichTextLayoutUnit.pas
@@ -640,13 +640,12 @@ Var
NewMarginX: longint;
StartedDrawing: boolean;
begin
- Line := TLayoutLine(FLines[ LineIndex ]);
- P := Line.Text;
- EndP := Line.Text + Line.Length;
-
+ Line := TLayoutLine(FLines[ LineIndex ]);
+ P := Line.Text;
+ EndP := Line.Text + Line.Length;
Style := Line.Style;
- FFontManager.SetFont( Style.Font );
+ FFontManager.SetFont( Style.Font );
StartedDrawing := false;
Link := '';
@@ -830,7 +829,7 @@ begin
begin
LineHeight := TLayoutLine(FLines[ LineIndex ]).Height;
if ( YToFind >= Y )
- and ( YToFind < Y + LineHeight ) then
+ and ( YToFind < (Y + LineHeight)) then
begin
// YToFind is within the line
Result := tpWithinText;
@@ -838,7 +837,7 @@ begin
exit;
end;
- inc( Y, TLayoutLine(FLines[ LineIndex ]).Height );
+ inc( Y, LineHeight );
inc( LineIndex );
end;