diff options
author | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2009-10-19 14:26:55 +0200 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2009-10-19 14:26:55 +0200 |
commit | 427d42cecffea4e1be4ea2db357daa8ef9674092 (patch) | |
tree | 2f4044eeabf7ef0e95673cedd40685afc13fad0b | |
parent | b03886895b493f1cacc0534e7058a67162264be9 (diff) | |
download | fpGUI-427d42cecffea4e1be4ea2db357daa8ef9674092.tar.xz |
Correct positioning of Scrollbars within RichTextView borders.
Before it used to place the scrollbars over the 2 px border of the
RichTextView component. Now it takes the 2px border into account.
Signed-off-by: Graeme Geldenhuys <graeme@mastermaths.co.za>
-rw-r--r-- | components/richtext/RichTextView.pas | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/components/richtext/RichTextView.pas b/components/richtext/RichTextView.pas index 498169f0..028d17a7 100644 --- a/components/richtext/RichTextView.pas +++ b/components/richtext/RichTextView.pas @@ -1184,26 +1184,26 @@ Begin FVScrollBar.PageSize := AvailableHeight div 2; // Physical horizontal scroll setup - FHScrollbar.Enabled := FNeedHScroll; FHScrollbar.Visible := FNeedHScroll; + FHScrollbar.Enabled := FNeedHScroll; FHScrollbar.Left := 0; - FHScrollbar.Top := Height - FScrollBarWidth; + FHScrollbar.Top := Height - FScrollBarWidth - 2; FHScrollbar.Height := FScrollbarWidth; if FNeedVScroll then - FHScrollbar.Width := Width - FScrollBarWidth + FHScrollbar.Width := Width - FScrollBarWidth - 2 else - FHScrollbar.Width := Width; + FHScrollbar.Width := Width - 4; // Physical vertical scroll setup FVScrollbar.Visible := FNeedVScroll; FVScrollbar.Enabled := FNeedVScroll; - FVScrollbar.Left := Width - FScrollbarWidth; - FVScrollbar.Top := 0; + FVScrollbar.Left := Width - FScrollbarWidth - 2; + FVScrollbar.Top := 2; FVScrollbar.Width := FScrollbarWidth; if FNeedHScroll then - FVScrollbar.Height := Height - FScrollbarWidth + FVScrollbar.Height := Height - FScrollbarWidth -2 else - FVScrollbar.Height := Height; + FVScrollbar.Height := Height - 4; // Initialise scroll FYScroll := FVScrollBar.Position; |