Marcel Taeumel uploaded a new version of ToolBuilder-Morphic to project The Trunk:
http://source.squeak.org/trunk/ToolBuilder-Morphic-mt.150.mcz ==================== Summary ==================== Name: ToolBuilder-Morphic-mt.150 Author: mt Time: 4 November 2015, 10:33:51.502 am UUID: 4df461c0-47b8-4cda-a915-4277646038fb Ancestors: ToolBuilder-Morphic-mt.149 Adds support for overriding scrollbar policies in trees. =============== Diff against ToolBuilder-Morphic-mt.149 =============== Item was changed: ----- Method: MorphicToolBuilder>>buildPluggableTree: (in category 'widgets required') ----- buildPluggableTree: aSpec | widget | widget := self treeClass new. self register: widget id: aSpec name. widget model: aSpec model. widget getSelectedPathSelector: aSpec getSelectedPath. widget setSelectedSelector: aSpec setSelected. widget getSelectedSelector: aSpec getSelected. widget setSelectedParentSelector: aSpec setSelectedParent. widget getChildrenSelector: aSpec getChildren. widget hasChildrenSelector: aSpec hasChildren. widget getLabelSelector: aSpec label. widget getIconSelector: aSpec icon. widget getHelpSelector: aSpec help. widget getMenuSelector: aSpec menu. widget keystrokeActionSelector: aSpec keyPress. widget nodeClass: aSpec nodeClass. widget getRootsSelector: aSpec roots. widget autoDeselect: aSpec autoDeselect. widget dropItemSelector: aSpec dropItem. widget wantsDropSelector: aSpec dropAccept. widget dragItemSelector: aSpec dragItem. widget columns: aSpec columns. + "Override default scroll bar policies if needed. Widget will use preference values otherwise." + aSpec hScrollBarPolicy ifNotNil: [:policy | + policy caseOf: { + [#always] -> [widget alwaysShowHScrollBar]. + [#never] -> [widget hideHScrollBarIndefinitely]. + [#whenNeeded] -> [widget showHScrollBarOnlyWhenNeeded]. } ]. + aSpec vScrollBarPolicy ifNotNil: [:policy | + policy caseOf: { + [#always] -> [widget alwaysShowVScrollBar]. + [#never] -> [widget hideVScrollBarIndefinitely]. + [#whenNeeded] -> [widget showVScrollBarOnlyWhenNeeded]. } ]. + self setFrame: aSpec frame in: widget. self setLayoutHintsFor: widget spec: aSpec. parent ifNotNil:[self add: widget to: parent]. " panes ifNotNil:[ aSpec roots ifNotNil:[panes add: aSpec roots]. ]. " ^widget! |
Hi, there is a somewhat related issue with scroll panes. In for example HelpBrowser you scroll down in the text pane with a long text. Then you click on an other help topic with a long text. The new help topic opens in a scrolled down pane. When opening a new topic the scrolling should be reset. Karl On Wed, Nov 4, 2015 at 10:33 AM, <[hidden email]> wrote: Marcel Taeumel uploaded a new version of ToolBuilder-Morphic to project The Trunk: |
Hi Karls,
if the contents grow, such as for the search results, resetting the scrolling/selection would be annoying. We have a trade-off here. :-) Maybe the model (HelpBrowser) should send a #selectionChanged when the topic changes. The text box must not decide this on its own. Best, Marcel |
It's seems most tools default to resetting the scroll delta for the text panes, just not the HelpBrowser. It would maybe be nice to follow that scheme and override in the exceptions ? Karl On Thu, Nov 5, 2015 at 10:28 AM, marcel.taeumel <[hidden email]> wrote: Hi Karls, |
Sure. But tools/models have to decide, not the PluggableTextMorph (i.e. the widget). ;-) Visual updates should be as stable as possible.
Best, Marcel |
Free forum by Nabble | Edit this page |