[Pkg] The Trunk: Morphic-cmm.785.mcz
commits at source.squeak.org
commits at source.squeak.org
Mon Mar 23 16:08:20 UTC 2015
Chris Muller uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-cmm.785.mcz
==================== Summary ====================
Name: Morphic-cmm.785
Author: cmm
Time: 23 March 2015, 11:07:11.337 am
UUID: 44fe53f8-470d-48cf-91f3-10b602d87f16
Ancestors: Morphic-topa.784
- Smart-Splitter behavior now accounts for possible icons.
- Fix incorrect Smart-Splitter adjustment when user has sized window width smaller than the sum of the minimum widths of all panes.
- Fix argAdvance: for selectors that were copied using "copy selector (c)" command.
=============== Diff against Morphic-topa.784 ===============
Item was changed:
----- Method: PluggableListMorph>>charactersOccluded (in category 'accessing') -----
charactersOccluded
"Answer the number of characters occluded in my #visibleList by my right edge."
+ | listIndex | listIndex:=0.
^ self visibleList
inject: 0
into:
+ [ : sum : each | | eachString totalWidth indexOfLastVisible iconWidth |
+ totalWidth:=0.
- [ : sum : each | | eachString totalWidth indexOfLastVisible |
- totalWidth := 0.
eachString := each asString "withBlanksTrimmed".
+ iconWidth := (self iconAt: (listIndex := listIndex+1)) ifNil:[0] ifNotNil: [ : icon | icon width+2 ].
indexOfLastVisible := ((1 to: eachString size)
detect:
+ [ : stringIndex | (totalWidth:=totalWidth+(self font widthOf: (eachString at: stringIndex))) >
- [ : index | (totalWidth := totalWidth + (self font widthOf: (eachString at: index))) >
(self width -
(scrollBar
ifNil: [ 0 ]
+ ifNotNil: [ scrollBar width ]) - iconWidth) ]
- ifNotNil: [ scrollBar width ])) ]
ifNone: [ eachString size + 1 ]) - 1.
sum + (eachString size - indexOfLastVisible) ]!
Item was changed:
----- Method: ProportionalSplitterMorph>>leftRightImbalance (in category 'layout') -----
leftRightImbalance
"First check if I find myself out of range due to user having reduced size of parent."
^ self left < self leftBoundary "too far left"
ifTrue: [ self leftBoundary-self left ]
ifFalse:
[ self right > self rightBoundary "too far right"
+ ifTrue: [ self rightBoundary-self right ]
- ifTrue: [ self right-self rightBoundary ]
ifFalse: [ self occlusionDifference ] ]!
Item was changed:
----- Method: TextEditor>>argAdvance: (in category 'typing/selecting keys') -----
argAdvance: aKeyboardEvent
"Invoked by Ctrl-a or Shift+Command+A. Useful after Ctrl-q.
+ Search forward from the end of the selection for a colon and place the caret after it. If no colon is found, do nothing."
- Search forward from the end of the selection for a colon followed by a space. Place the caret after the space. If none are found, place the caret at the end of the text. Does not affect the undoability of the previous command."
| start |
self insertAndCloseTypeIn.
start := paragraph text
+ findString: ':'
- findString: ': '
startingAt: self stopIndex.
+ start isZero ifFalse: [ self selectAt: start + 1 ].
- start isZero
- ifTrue:
- [ (start := paragraph text
- findString: ':'
- startingAt: self stopIndex) isZero ifTrue: [ start := paragraph text size + 1 ] ]
- ifFalse: [ start := start + 1 ].
- self selectAt: start + 1.
^ true!
More information about the Packages
mailing list