Christoph Thiede uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-ct.2052.mcz
==================== Summary ====================
Name: Morphic-ct.2052 Author: ct Time: 4 November 2022, 4:20:08.148791 pm UUID: b49f6fa4-1658-bf49-89ae-5dcb08e955af Ancestors: Morphic-mt.2051
Makes scratch pad scale-factor-aware and improves multilingual support.
=============== Diff against Morphic-mt.2051 ===============
Item was changed: ----- Method: SearchBar>>layoutScratchPad (in category 'private') ----- layoutScratchPad | world pos width | world := Project current world. world mainDockingBars do: [ : each | each searchBarMorph ifNotNil: [ : searchBar | pos := searchBar bottomLeft. width := searchBar width ] ]. + width ifNil: [ width := 250 px. pos := world topRight - (width @ 5 px) ]. - width ifNil: [ width := 250. pos := world topRight - (width @ 5) ]. scratchPad width: width ; position: pos ; startStepping: #deleteUnlessHasFocus at: Time millisecondClockValue arguments: nil stepTime: 3000!
Item was changed: ----- Method: SearchBar>>printIt:result: (in category 'do-its') ----- printIt: code result: object
| focusedWidget | focusedWidget := self currentHand keyboardFocus.
self removeResultsWidget. ToolBuilder default in: [:builder | resultsWidget := (builder build: (StringHolder new contents: object asString; buildCodePaneWith: builder)). "This might cause the widget disappear to early. Especially if the textMorph is to small but the container needs to maintain a larger size because of its scroll bars." resultsWidget textMorph on: #mouseLeave send: #delete to: resultsWidget. resultsWidget + extent: 1000 px @ 1000 px; fullBounds; "give text a chance to layout good" + width: 250 px; fullBounds; + height: (resultsWidget extentToFit y min: 300 px); - extent: 1000@1000; fullBounds; "give text a chance to layout good" - width: 250; fullBounds; - height: (resultsWidget extentToFit y min: 300); position: (focusedWidget ifNotNil: [:w | w owner boundsInWorld bottomLeft] ifNil: [self currentHand position]); color: (BalloonMorph balloonColor alpha: 1.0). Preferences menuAppearance3d ifTrue: [resultsWidget addDropShadow]. resultsWidget openInWorld].!
Item was changed: ----- Method: SearchBar>>scratchPad (in category 'accessing') ----- scratchPad ^ scratchPad ifNil: [ scratchPad := TextMorphForEditView new. "we should be able to use TextMorph here; fix later" scratchPad " on: #keyboardFocusChange send: #removeScratchPad to: self ;" on: #mouseLeave send: #removeScratchPad to: self ; on: #keyStroke send: #handleScratchPadKey: to: self ; + margins: (5 px @ 0 corner: 5 px @ 0); - margins: (5@0 corner: 5@0); backgroundColor: ((UserInterfaceTheme current get: #color for: #NewBalloonMorph) ifNil: [ BalloonMorph balloonColor ]) ; setEditView: PluggableTextMorph new ; "dummy" autoFit: true ; wrapFlag: true ; + newContents: '--scratch area--' translated; - newContents: '--scratch area--' ; font: ((UserInterfaceTheme current get: #font for: #PluggableTextMorph) ifNil: [TextStyle defaultFont]); textColor: ((UserInterfaceTheme current get: #textColor for: #PluggableTextMorph) ifNil: [Color black]); caretColor: ((UserInterfaceTheme current get: #caretColor for: #PluggableTextMorph) ifNil: [Color red]); selectionColor: ((UserInterfaceTheme current get: #selectionColor for: #PluggableTextMorph) ifNil: [Color blue muchDarker] ifNotNil: [ : col | col twiceLighter ]); yourself. self layoutScratchPad. Preferences menuAppearance3d ifTrue: [ scratchPad addDropShadow ]. scratchPad ]!
Item was changed: ----- Method: SearchBar>>smartSearch:in: (in category 'searching') ----- smartSearch: text in: morph "Take the user input and perform an appropriate search" | input newContents | self removeResultsWidget. input := text asString ifEmpty:[^self]. self class useSmartSearch ifFalse: [^ ToolSet default browseMessageNames: input].
(Symbol lookup: input) ifNotNil: [:symbol| input := symbol]. "If it is a global or a full class name, browse that class." (Smalltalk bindingOf: input) ifNotNil: [:assoc| | class | class := (assoc value isBehavior ifTrue:[assoc value] ifFalse:[assoc value class]) theNonMetaClass. ^ToolSet browseClass: class]. "If it is a symbol and there are implementors of it, browse those implementors." input isSymbol ifTrue: [(SystemNavigation new allImplementorsOf: input) ifNotEmpty: [:list| ^SystemNavigation new browseMessageList: list + name: ('Implementors of {1}' translated format: {input})]]. - name: 'Implementors of ' , input]].
"If it starts uppercase, browse classes if any. Otherwise, just search for messages." input first isUppercase ifTrue: [(UIManager default classFromPattern: input withCaption: '') ifNotNil: [:aClass| ^ToolSet browse: aClass selector: nil]. + newContents := input, ' -- not found.' translated. - newContents := input, ' -- not found.'. self searchTerm: newContents. self selection: (input size+1 to: newContents size). self currentHand newKeyboardFocus: morph textMorph. ^ self].
"Default to browse message names..." ToolSet default browseMessageNames: input!
squeak-dev@lists.squeakfoundation.org