diff options
author | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2008-07-24 10:57:21 +0000 |
---|---|---|
committer | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2008-07-24 10:57:21 +0000 |
commit | 70145feefdb546f0f1fd18cf9f3f804c8304fc01 (patch) | |
tree | afb65b5af1d4cb6c320b3ed879fdd01a3b0e8e97 /src/corelib | |
parent | eaf3100e8d682ac3bc28725c004e4836169d7654 (diff) | |
download | fpGUI-70145feefdb546f0f1fd18cf9f3f804c8304fc01.tar.xz |
* Minor fix in right aligned text. Removing remainder spaces before a linebreak.
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/fpgfx.pas | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/corelib/fpgfx.pas b/src/corelib/fpgfx.pas index 1d5a23cc..bbc530d7 100644 --- a/src/corelib/fpgfx.pas +++ b/src/corelib/fpgfx.pas @@ -1107,7 +1107,8 @@ end; { TfpgCanvas } // Warning! This function is not supposed to handle existing line breaks, -// it is only supposed to insert new ones when appropriate. +// it is only supposed to insert new ones when appropriate. Also, this function +// simply inserts line breaks, it doesn't split text lines etc... function TfpgCanvas.AddLineBreaks(const s: TfpgString; aMaxLineWidth: integer): string; var i, n, ls: integer; @@ -1141,7 +1142,7 @@ begin if (lw + tw > aMaxLineWidth) and (lw > 0) then begin lw := tw; - Result := Result + sLineBreak; + Result := TrimRight(Result) + sLineBreak; end else Inc(lw, tw); Result := Result + sub; |