From 31dc8b6a853e7334be9431496f94d290d7173e5d Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Thu, 11 Aug 2011 11:16:07 +0200 Subject: richview: fixes the painting bug of bottom/right corner rectangle Refactored the code, so we only use UpdateScrollBarCoords() method. --- docview/components/richtext/RichTextView.pas | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/docview/components/richtext/RichTextView.pas b/docview/components/richtext/RichTextView.pas index 5db8cbdf..fae04180 100644 --- a/docview/components/richtext/RichTextView.pas +++ b/docview/components/richtext/RichTextView.pas @@ -1279,24 +1279,10 @@ function TRichTextView.GetTextAreaWidth: longint; // Physical horizontal scroll setup FHScrollbar.Visible := FNeedHScroll; FHScrollbar.Enabled := FNeedHScroll; - FHScrollbar.Left := 2; - FHScrollbar.Top := Height - 2 - FScrollBarWidth; - FHScrollbar.Height := FScrollbarWidth; - if FNeedVScroll then - FHScrollbar.Width := Width - 4 - FScrollBarWidth - else - FHScrollbar.Width := Width - 4; // Physical vertical scroll setup FVScrollbar.Visible := FNeedVScroll; FVScrollbar.Enabled := FNeedVScroll; - FVScrollbar.Left := Width - 2 - FScrollbarWidth; - FVScrollbar.Top := 2; - FVScrollbar.Width := FScrollbarWidth; - if FNeedHScroll then - FVScrollbar.Height := Height - 4 - FScrollbarWidth - else - FVScrollbar.Height := Height - 4; // Initialise scroll FYScroll := FVScrollBar.Position; @@ -1306,6 +1292,8 @@ function TRichTextView.GetTextAreaWidth: longint; FVScrollbar.OnScroll := @FVScrollbarScroll; FHScrollbar.OnScroll := @FHScrollbarScroll; + + UpdateScrollBarCoords; End; Procedure TRichTextView.SetupCursor; -- cgit v1.2.3-54-g00ecf