summaryrefslogtreecommitdiff
path: root/docview/components/richtext
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graeme@mastermaths.co.za>2011-08-11 16:52:38 +0200
committerGraeme Geldenhuys <graeme@mastermaths.co.za>2011-08-11 16:52:38 +0200
commitbb8c4f991b4e7e1ca49978c253f8ac729faeb262 (patch)
tree8cab7fc21937bd8c5c286bccc7a77f541e5412d5 /docview/components/richtext
parent17af700f7c02621ec53b86d487706ecfa80397c8 (diff)
downloadfpGUI-bb8c4f991b4e7e1ca49978c253f8ac729faeb262.tar.xz
RichView: Correctly calculate the HScrollBar Max value.
Now that we correctly the FLayout.Width value this change could now be made.
Diffstat (limited to 'docview/components/richtext')
-rw-r--r--docview/components/richtext/RichTextView.pas5
1 files changed, 2 insertions, 3 deletions
diff --git a/docview/components/richtext/RichTextView.pas b/docview/components/richtext/RichTextView.pas
index 46873de1..0cce5705 100644
--- a/docview/components/richtext/RichTextView.pas
+++ b/docview/components/richtext/RichTextView.pas
@@ -1233,7 +1233,7 @@ begin
// Calculate used and available width
AvailableWidth := GetTextAreaWidth;
- MaxDisplayWidth := FLayout.Width + 200; { TODO : We need to fix FLayout.Width first before we remove + 200 }
+ MaxDisplayWidth := FLayout.Width;
// Horizontal scroll setup
if MaxDisplayWidth > AvailableWidth then
@@ -1242,8 +1242,7 @@ begin
// FHScrollbar.SliderSize := AvailableWidth div 2;
FHScrollbar.Min := 0;
if FNeedHScroll then
- { TODO : As soon as we fix FLayout.Width, then we can enable the extra code below }
- FHScrollbar.Max := (MaxDisplayWidth) // - AvailableWidth) + FScrollbarWidth
+ FHScrollbar.Max := (MaxDisplayWidth - AvailableWidth) + FScrollbarWidth
else
begin
FHScrollBar.Position := 0;