From 111b4fbcaf41227f1d3983799efa8737a5566509 Mon Sep 17 00:00:00 2001 From: Stefano Ceccherini Date: Mon, 20 Feb 2006 22:09:39 +0000 Subject: [PATCH] BTextControl was filling some part of the inner BTextView with the view color, thus hidding the text. This fixes bug 161 git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16485 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/interface/TextControl.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/kits/interface/TextControl.cpp b/src/kits/interface/TextControl.cpp index 03bf6dcd12..e14b56a8d1 100644 --- a/src/kits/interface/TextControl.cpp +++ b/src/kits/interface/TextControl.cpp @@ -278,6 +278,7 @@ BTextControl::Draw(BRect updateRect) BRegion updateRegion(updateRect); // why is there no IntersectWith(BRect &) version? region.IntersectWith(&updateRegion); + region.Exclude(fText->Frame()); FillRegion(®ion); if (Label()) { @@ -657,7 +658,7 @@ BTextControl::_InitData(const char* label, const char* initialText, // we are stroking the frame around the text view, which // is 2 pixels wide frame.InsetBy(4.0, 3.0); - BRect textRect(frame.OffsetToCopy(0.0f, 0.0f)); + BRect textRect(frame.OffsetToCopy(B_ORIGIN)); fText = new _BTextInput_(frame, textRect, B_FOLLOW_LEFT_RIGHT | B_FOLLOW_TOP,