Spec
Spec copied to clipboard
[BUG] - SpNumberInputFieldPresenter cannot be resize properly
Hello, I'm not sure if it's a bug or if it has been reported.
Description
I'm trying to build an application that use SpNumberInputFieldPresenter
inside SpPanedLayout. The SpNumberInputFieldPresenter
doesn't display well inside the SpPanedLayout
. Also the display bug when i resize the window.
I think the SpNumberInputFieldPresenter
cannot shrink.
Example 1 (bug : SpNumberInputFieldPresenter + SpPanedLayout)
Here i drag the SpPanedLayout
.
The SpNumberInputFieldPresenter
can grow but never shrink. (The button 'helloworld' disapear).
Example 2 (bug : SpNumberInputFieldPresenter + resize window)
Here i resize the window.
The SpNumberInputFieldPresenter
can grow but never shrink. (The button 'helloworld' disappear).
Example 3 (no bug : SpTextInputFieldPresenter)
I do the same thing but this time using a SpTextInputFieldPresenter
. The button never disappear.
Reproduction
code to reproduce:
"Example 1"
spItem := SpButtonPresenter new label: 'hello world'; yourself.
spNumber := SpNumberInputFieldPresenter new.
layoutLeft := SpBoxLayout newLeftToRight add: spNumber; add: spItem; yourself.
spLeft := SpPresenter new.
spLeft layout: layoutLeft.
layoutMain := SpPanedLayout newLeftToRight first: spLeft; second: SpNullPresenter new; yourself.
spMain := SpPresenter new.
spMain layout: layoutMain.
spMain open.
"Example 2"
spItem := SpButtonPresenter new label: 'hello world'; yourself.
spNumber := SpNumberInputFieldPresenter new.
layoutLeft := SpBoxLayout newLeftToRight add: spNumber; add: spItem; yourself.
spLeft := SpPresenter new.
spLeft layout: layoutLeft.
spLeft open.
"Example 3 - first"
spItem := SpButtonPresenter new label: 'hello world'; yourself.
spText := SpTextInputFieldPresenter new.
layoutLeft := SpBoxLayout newLeftToRight add: spText; add: spItem; yourself.
spLeft := SpPresenter new.
spLeft layout: layoutLeft.
spLeft open.
"Example 3 - second"
spItem := SpButtonPresenter new label: 'hello world'; yourself.
spText := SpTextInputFieldPresenter new.
layoutLeft := SpBoxLayout newLeftToRight add: spText ; add: spItem; yourself.
spLeft := SpPresenter new.
spLeft layout: layoutLeft.
layoutMain := SpPanedLayout newLeftToRight first: spLeft; second: SpNullPresenter new; yourself.
spMain := SpPresenter new.
spMain layout: layoutMain.
spMain open.
expected result:
The SpNumberInputFieldPresenter
should have the same comportement has SpTextInputFieldPresenter
.
Other
pharo image : Pharo-11.0.0+build.346.sha.b6ce4527b4f4881d6c6b4f968f1d1348b783b7a2 (64 Bit) spec: [e496266] 2023-02-08. I also tested it on the spec version that come with the base Image.