[squeak-dev] The Trunk: MorphicExtras-tpr.340.mcz
commits at source.squeak.org
commits at source.squeak.org
Mon Jan 16 01:58:18 UTC 2023
tim Rowledge uploaded a new version of MorphicExtras to project The Trunk:
http://source.squeak.org/trunk/MorphicExtras-tpr.340.mcz
==================== Summary ====================
Name: MorphicExtras-tpr.340
Author: tpr
Time: 15 January 2023, 5:58:13.807896 pm
UUID: b7a3b5ab-6aa5-4d19-bf3a-90a7c22110d9
Ancestors: MorphicExtras-tpr.339
Remove some variable shadowing
=============== Diff against MorphicExtras-tpr.339 ===============
Item was changed:
----- Method: BookMorph>>insertPageColored: (in category 'insert and delete') -----
insertPageColored: aColor
"Insert a new page for the receiver, using the given color as its background color"
+ | pageExtent newPage newPageBorderWidth backgroundColor |
+ currentPage
+ ifNil:
+ [pageExtent := pageSize.
+ newPageBorderWidth := 0.
+ backgroundColor := Color blue muchLighter]
+ ifNotNil:
+ [pageExtent := currentPage extent.
+ newPageBorderWidth := currentPage borderWidth.
+ backgroundColor := currentPage borderColor].
+ newPagePrototype
+ ifNil:
+ [newPage := PasteUpMorph new.
- | pageExtent newPage borderWidth backgroundColor |
- backgroundColor := currentPage isNil
- ifTrue:
- [pageExtent := pageSize.
- borderWidth := 0.
- Color blue muchLighter]
- ifFalse:
- [pageExtent := currentPage extent.
- borderWidth := currentPage borderWidth.
- currentPage borderColor].
- newPagePrototype ifNil:
- [newPage := (PasteUpMorph new)
- extent: pageExtent;
- color: aColor.
newPage
+ extent: pageExtent;
+ color: aColor;
+ borderWidth: newPageBorderWidth;
- borderWidth: borderWidth;
borderColor: backgroundColor]
ifNotNil: [newPage := Cursor wait showWhile: [newPagePrototype veryDeepCopy]].
newPage setNameTo: self defaultNameStemForNewPages.
newPage vResizeToFit: false.
pages isEmpty
ifTrue: [pages add: (currentPage := newPage)]
ifFalse: [pages add: newPage after: currentPage].
self nextPage!
Item was changed:
----- Method: ObjectsTool>>highlightOnlySubmorph:in: (in category 'tabs') -----
highlightOnlySubmorph: aMorph in: anotherMorph
"Distinguish only aMorph with border highlighting (2-pixel wide red); make all my other submorphs have one-pixel-black highlighting. This is a rather special-purpose and hard-coded highlighting regime, of course. Later, if someone cared to do it, we could parameterize the widths and colors via properties, or some such."
+ anotherMorph submorphs do:
+ [:m | | newColor |
+ newColor := m == aMorph
+ ifTrue: [self buttonActiveColor]
+ ifFalse: [self buttonColor].
- anotherMorph submorphs do: [:m | | color |
- color := m == aMorph ifTrue: [self buttonActiveColor] ifFalse: [self buttonColor].
m
+ borderWidth: 1;
+ borderColor: newColor.
+ m firstSubmorph color: newColor]
+ !
- borderWidth: 1 px;
- borderColor: color.
- m firstSubmorph color: color]!
Item was changed:
----- Method: SketchEditorMorph>>initializeFor:inBounds:pasteUpMorph: (in category 'initialization') -----
initializeFor: aSketchMorph inBounds: boundsToUse pasteUpMorph: aPasteUpMorph
"Initialize the receiver to edit the given sketchMorph in the given bounds, with the resulting object to reside in the given pasteUpMorph."
| paintBoxBounds worldBounds |
self world paintingFlapTab ifNotNil: [:tab |
tab showFlap.
^ self
initializeFor: aSketchMorph
inBounds: boundsToUse
pasteUpMorph: aPasteUpMorph
paintBoxPosition: nil].
self setProperty: #recipientPasteUp toValue: aPasteUpMorph.
paintBoxBounds := self world paintBox bounds.
worldBounds := self world bounds.
+ aPasteUpMorph standardPalette ifNotNil: [:stdPalette | stdPalette showNoPalette].
- aPasteUpMorph standardPalette ifNotNil: [:palette | palette showNoPalette].
self initializeFor: aSketchMorph inBounds: boundsToUse
pasteUpMorph: aPasteUpMorph
paintBoxPosition: ((boundsToUse topRight extent: paintBoxBounds extent)
translatedToBeWithin: worldBounds) topLeft.
!
More information about the Squeak-dev
mailing list
|