Changes between Initial Version and Version 1 of Ticket #16476, comment 6


Ignore:
Timestamp:
Nov 23, 2020, 8:17:59 PM (3 years ago)
Author:
jscipione

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #16476, comment 6

    initial v1  
    22
    33before SetText()
     4
     5{{{
    46BRect(l:4.0, t:4.0, r:1019.0, b:-4.0)
    57BRect(l:4.0, t:31.0, r:1019.0, b:23.0)
    68BRect(l:4.0, t:58.0, r:1019.0, b:50.0)
     9}}}
    710after SetText()
     11{{{
    812BRect(l:0.0, t:0.0, r:60.0, b:13.0)
    913BRect(l:0.0, t:0.0, r:59.0, b:13.0)
    1014BRect(l:0.0, t:0.0, r:59.0, b:13.0)
     15}}}
    1116
    1217So you can see that on BeOS it is fixing up of the text rect. Here is the same program running on Haiku:
    1318
    1419before SetText()
     20{{{
    1521BRect(l:4.0, t:4.0, r:1361.0, b:-4.0)
    1622BRect(l:4.0, t:36.0, r:1361.0, b:28.0)
    1723BRect(l:4.0, t:68.0, r:1361.0, b:60.0)
     24}}}
    1825after SetText()
     26{{{
    1927BRect(l:0.0, t:0.0, r:0.0, b:18.0)
    2028BRect(l:0.0, t:0.0, r:0.0, b:18.0)
    2129BRect(l:0.0, t:0.0, r:0.0, b:18.0)
     30}}}
    2231
    2332Aha! On Haiku we don't try to fix the text rect if it is 0 width. So this is the reason that we are getting this odd vertical scrolling on Haiku.
     
    2635
    2736before SetText()
     37{{{
    2838BRect(l:4.0, t:4.0, r:1361.0, b:-4.0)
    2939BRect(l:4.0, t:36.0, r:1361.0, b:28.0)
    3040BRect(l:4.0, t:68.0, r:1361.0, b:60.0)
     41}}}
    3142after SetText()
     43{{{
    3244BRect(l:3.0, t:0.0, r:193.0, b:18.0)
    3345BRect(l:3.0, t:0.0, r:193.0, b:18.0)
    3446BRect(l:3.0, t:0.0, r:193.0, b:18.0)
     47}}}
    3548
    3649Progress! I'll get into the change I made in a minute. The output is not exactly the same as BeOS, but it's close. It seems that BeOS will set the text rect to the width of the string, while in Haiku we set it to the width of the text view instead. That difference aside, once the text rect is not initially 0 width, the BTextView size is fixed up properly and displays correctly!