Opened 12 months ago

Closed 12 months ago

Last modified 8 months ago

#14176 closed bug (invalid)

Non editable BTextView + LayoutBuilder not good

Reported by: irtusb Owned by: nobody
Priority: normal Milestone: Unscheduled
Component: Kits/Interface Kit Version: R1/Development
Keywords: Cc:
Blocked By: Blocking: #14309
Has a Patch: no Platform: All

Description

this is x86_gcc2 hrev 51983

I made a BTextView and attached to a window using layoutbuilder, but when set the text view to non editable it looks and behaves different.

  1. broken text wrapping: at some specifics widths text overflows the text view. Hides last line (the incomplete one).
  2. Layout based resizing broken: it follows full width, but Height changes according text content. Leaves empty space above and below of it

I expect it behaves the same as it editable form, occupy full width and height if using layout builder.

Attached sample code and screenshots

Attachments (3)

testtextview.cpp (1.5 KB) - added by irtusb 12 months ago.
sample code. link with -lbe
20180601 haiku tv.png (26.6 KB) - added by irtusb 12 months ago.
tvfix.diff (1.5 KB) - added by irtusb 12 months ago.

Download all attachments as: .zip

Change History (9)

Changed 12 months ago by irtusb

Attachment: testtextview.cpp added

sample code. link with -lbe

Changed 12 months ago by irtusb

Attachment: 20180601 haiku tv.png added

comment:1 Changed 12 months ago by irtusb

I'm not sure what component should I put this ticket on.

comment:2 Changed 12 months ago by pulkomandy

Component: User InterfaceKits/Interface Kit
Owner: changed from stippi to nobody

comment:3 Changed 12 months ago by irtusb

usage of IsEditable when calculating height is the culprit. Base methods from BView work fine. Attached patch

Last edited 12 months ago by irtusb (previous) (diff)

Changed 12 months ago by irtusb

Attachment: tvfix.diff added

comment:4 Changed 12 months ago by irtusb

looks like it is intended to work that way, for the BTextView to be vertically centered on the available space.

Please close as invalid.

comment:5 Changed 12 months ago by waddlesplash

Resolution: invalid
Status: newclosed

comment:6 Changed 8 months ago by waddlesplash

Blocking: 14309 added
Note: See TracTickets for help on using tickets.