Opened 7 years ago

Last modified 2 years ago

#14176 reopened bug

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
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 (4)

testtextview.cpp (1.5 KB ) - added by irtusb 7 years ago.
sample code. link with -lbe
20180601 haiku tv.png (26.6 KB ) - added by irtusb 7 years ago.
tvfix.diff (1.5 KB ) - added by irtusb 7 years ago.
main.cpp (1.2 KB ) - added by jackburton 2 years ago.
with a BTextControl

Download all attachments as: .zip

Change History (11)

by irtusb, 7 years ago

Attachment: testtextview.cpp added

sample code. link with -lbe

by irtusb, 7 years ago

Attachment: 20180601 haiku tv.png added

comment:1 by irtusb, 7 years ago

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

comment:2 by pulkomandy, 7 years ago

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

comment:3 by irtusb, 7 years ago

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

Last edited 7 years ago by irtusb (previous) (diff)

by irtusb, 7 years ago

Attachment: tvfix.diff added

comment:4 by irtusb, 7 years ago

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 by waddlesplash, 7 years ago

Resolution: invalid
Status: newclosed

comment:6 by waddlesplash, 6 years ago

Blocking: 14309 added

comment:7 by jackburton, 2 years ago

Resolution: invalid
Status: closedreopened

I'm not sure this should be closed as invalid, since it introduces issues when you use a BTextView (or a BTextControl) in a layout. See also #14309

by jackburton, 2 years ago

Attachment: main.cpp added

with a BTextControl

Note: See TracTickets for help on using tickets.