[haiku-bugs] Re: [Haiku] #6015: BTextView does not reformat its text when resized

  • From: "stippi" <trac@xxxxxxxxxxxx>
  • Date: Sun, 16 May 2010 17:56:44 -0000

#6015: BTextView does not reformat its text when resized
--------------------------------+-------------------------------------------
 Reporter:  Trezker             |       Owner:  axeld    
     Type:  bug                 |      Status:  new      
 Priority:  normal              |   Milestone:  R1       
Component:  Kits/Interface Kit  |     Version:  R1/alpha2
 Keywords:  BTextView           |    Platform:  All      
Blockedby:                      |       Patch:  0        
 Blocking:                      |  
--------------------------------+-------------------------------------------

Old description:

> The textRect isn't resized when the BTextView instance is.
>
> I looked through TextView.cpp and found that it should work properly if
> _ResetTextRect()  is called in BTextView::FrameResized.
>
>  BTextView::FrameResized(float width, float height)
>  {
>         BView::FrameResized(width, height);
> +       _ResetTextRect();
>         _UpdateScrollbars();
>  }

New description:

 The textRect isn't resized when the BTextView instance is.

 I looked through TextView.cpp and found that it should work properly if
 _ResetTextRect()  is called in BTextView::FrameResized.

 {{{
  BTextView::FrameResized(float width, float height)
  {
         BView::FrameResized(width, height);
 +       _ResetTextRect();
         _UpdateScrollbars();
  }
 }}}

--

Comment(by stippi):

 This cannot be changed for backwards compatibility reasons. Orginial BeOS
 software will override BTextView::FrameResized() and manually call
 SetTextRect(). When you use a BTextControl in nay layout managed code,
 it's supposed to work automatically. I suppose it happens in DoLayout(),
 but I am not sure off the top of my head.

-- 
Ticket URL: <http://dev.haiku-os.org/ticket/6015#comment:1>
Haiku <http://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: