[Cuis-dev] TextModelMorph horizontal scrolling isses
Juan Vuletich
juan at cuis.st
Tue Feb 6 08:01:34 PST 2024
On 2/4/2024 3:31 PM, Bernhard Pieber via Cuis-dev wrote:
> Hi folks,
>
> I played around with TextModelMorph and noted some minor issues.
>
> If I do the following:
> (TextModelMorph withText: 'This is a long long long line.')
> wrapFlag: false;
> openInWorld.
>
> 1. The morph opens with a horizontal scrollbar as expected. If I click after the first long and enter carriage return in order to split the line into two short lines I expect the horizontal scrollbar to disappear. However, it is unchanged.
>
> The reason seems to be that the InnerTextMorph width is not reduced. I tried calling adjustExtent and fit. However, this does not reduce the width. The reason for that is that TextComposition maxRightX is not updated. InnerTextMorph>>#resetTextComposition does the trick. However, I am not sure if calling this is the right fix compared to somehow fixing TextComposition>>#recomposeFrom:to:delta:.
>
> 2. If I add a new line and type an even longer line the horizontal scroll bar’s width gets smaller as expected. However, the text I enter is not scrolled into view. The method PluggableScrollPane>>#scrollToShow: seems to only do vertical scrolling but not horizontal scrolling.
>
> The attached changeset seems to fix the second issue.
>
> Cheers,
> Bernhard
Thanks, Bernhard. I just pushed your fix, together with a fix for issue #1.
Cheers,
--
Juan Vuletich
cuis.st
github.com/jvuletich
researchgate.net/profile/Juan-Vuletich
independent.academia.edu/JuanVuletich
patents.justia.com/inventor/juan-manuel-vuletich
linkedin.com/in/juan-vuletich-75611b3
twitter.com/JuanVuletich
More information about the Cuis-dev
mailing list