Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0001404 [Squeak] Morphic minor always 07-02-05 00:37 08-22-07 05:11
Reporter KenCausey View Status public  
Assigned To
Priority normal Resolution open  
Status new   Product Version 3.8
Summary 0001404: [Bug] The ever-widening PluggableTextMorph
Description ( PluggableTextMorph
    on: nil
    text: nil
    accept: nil
    readSelection: nil
    menu: nil )
    extent: 50@100;
    editString: 'This is some really long text that will hopefully cause
the PTM to wrap and a scollbar appear';
    hResizing: #shrinkWrap;
    openInWorld.

Now either extend the text or just wiggle the scrollbar and watch the
PluggableTextMorph widen and widen. The hResizing: #shrinkWrap seems to
lead to this behaviour.
Additional Information
Attached Files

- Relationships
child of 0006635new  Mother of Squeak UI annoyances 

- Notes
(0001704 - 1754 - 2609 - 2653 - 2653 - 2653 - 2653)
KenCausey
07-02-05 00:39

"frits.swinkels" <frits.swinkels@shaw.ca>:

"The following code has the same problem:
(PluggableListMorph on:
#(A b c d e f g h i j k l)
list: #contents selected: nil changeSelected: nil)
color: Color green;
hResizing: #shrinkWrap;
fullBounds ;
openInWorld

replace the normal wondow building method in ObjectExplorer with the
following:
explorerFor: anObject
    | listMorph |
    rootObject _ anObject.

    (listMorph _ SimpleHierarchicalListMorph
            on: self
            list: #getList
            selected: #getCurrentSelection
            changeSelected: #noteNewSelection:
            menu: #genericMenu:
            keystroke: nil).

    listMorph autoDeselect: false; hResizing: #shrinkWrap.
    ^listMorph

or introduce hResizing: #shrinkWrap in the original method. Open it on
Smalltalk, expand it and move the scrollbar to see utter confusion!

These are all subclasses of scrollpane, but I have not tested
AlansTextPlusMorph, the only other subclass.

For the morphs under discussion, it should be noted that innerBounds is
calculated to be bounds minus the scrollbar: innerBounds is used to set
the extent of the scroller, the scrolling pane.In the method
Morph>>adjustLayoutBounds there is first a correction to the width when
hResizing = #shrinkWrap and then later -in Morph>>layoutBounds: the same
correction is made once more. innerbounds figures in those calculations
directly or indirectly.

Possible fixes (e.g.don't use #shrinkWrap or disable/change
ScrollPane>>adjustLayoutBounds) don't really answer your or my
questionas to why it was designed that way. In a sense, shrinkWrap does
not make sense for the PluggableTextMorph and friends, because they are
shrinkwrap by design: the inner text pane is calculated by the PTM to
fill itself!"
 

- Issue History
Date Modified Username Field Change
07-02-05 00:37 KenCausey New Issue
07-02-05 00:39 KenCausey Note Added: 0001704
08-22-07 05:11 matthewf Relationship added child of 0006635


Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
37 total queries executed.
29 unique queries executed.
Powered by Mantis Bugtracker