From c7ba471b98d49c02706370ef499e3d4d2c1d70e7 Mon Sep 17 00:00:00 2001 From: Marcus Denker Date: Thu, 1 Mar 2018 15:53:20 +0100 Subject: [PATCH] Small clean EyeInspector: remove Test, move #resize on ImageMorph to ImageMorph https://pharo.fogbugz.com/f/cases/21456/Small-clean-EyeInspector-remove-Test-move-resize-on-ImageMorph-to-ImageMorph --- src/Morphic-Base/ImageMorph.class.st | 6 +++ src/Morphic-Base/TextMorph.class.st | 6 +-- src/Spec-Inspector/EyeInspectorTest.class.st | 39 -------------------- src/Spec-Inspector/ImageMorph.extension.st | 7 ---- 4 files changed, 9 insertions(+), 49 deletions(-) delete mode 100644 src/Spec-Inspector/EyeInspectorTest.class.st delete mode 100644 src/Spec-Inspector/ImageMorph.extension.st diff --git a/src/Morphic-Base/ImageMorph.class.st b/src/Morphic-Base/ImageMorph.class.st index ed086645142..ae8abefd876 100644 --- a/src/Morphic-Base/ImageMorph.class.st +++ b/src/Morphic-Base/ImageMorph.class.st @@ -255,6 +255,12 @@ ImageMorph >> releaseCachedState [ ] +{ #category : #other } +ImageMorph >> resize: newSize [ + + self form: (image scaledToSize: newSize) +] + { #category : #testing } ImageMorph >> shouldFlex [ ^ true. diff --git a/src/Morphic-Base/TextMorph.class.st b/src/Morphic-Base/TextMorph.class.st index c9ba54d511a..ab2727431bc 100644 --- a/src/Morphic-Base/TextMorph.class.st +++ b/src/Morphic-Base/TextMorph.class.st @@ -609,7 +609,7 @@ TextMorph >> editor [ TextMorph >> editorClass [ "Answer the class used to create the receiver's editor" - ^SmalltalkEditor + ^TextEditor ] { #category : #accessing } @@ -849,8 +849,8 @@ TextMorph >> getLastCharacter [ { #category : #'event handling' } TextMorph >> getMenu: shiftKeyState [ ^ shiftKeyState not - ifTrue: [TextEditor yellowButtonMenu] - ifFalse: [TextEditor shiftedYellowButtonMenu] + ifTrue: [editor yellowButtonMenu] + ifFalse: [editor shiftedYellowButtonMenu] ] { #category : #'submorphs-add/remove' } diff --git a/src/Spec-Inspector/EyeInspectorTest.class.st b/src/Spec-Inspector/EyeInspectorTest.class.st deleted file mode 100644 index 395a408ecb4..00000000000 --- a/src/Spec-Inspector/EyeInspectorTest.class.st +++ /dev/null @@ -1,39 +0,0 @@ -Class { - #name : #EyeInspectorTest, - #superclass : #TestCase, - #category : #'Spec-Inspector-Test' -} - -{ #category : #accessing } -EyeInspectorTest >> instancesToTry [ - ^ { - Object new . - Class . - Metaclass . - Array new . - Dictionary new . - WordArray new. - ByteArray new. - Color red . - thisContext . - 12 . - #symbol . - (12.32) . - TBehavior . - (SmallInteger>>#+) . - #(1 2 3) . - #[1 2 3] . - [ 1 + 2 ] . - Error new . - (1 << 40) - } -] - -{ #category : #tests } -EyeInspectorTest >> testErrorRaised [ - | inspector morphsBefore morphsAfter | - morphsBefore := World submorphs. - self instancesToTry do: [ :each | inspector := EyeInspector inspector: each]. - morphsAfter := World submorphs. - (morphsAfter copyWithoutAll: morphsBefore) do: [ :morph | morph delete ]. -] diff --git a/src/Spec-Inspector/ImageMorph.extension.st b/src/Spec-Inspector/ImageMorph.extension.st deleted file mode 100644 index b47f97e08d6..00000000000 --- a/src/Spec-Inspector/ImageMorph.extension.st +++ /dev/null @@ -1,7 +0,0 @@ -Extension { #name : #ImageMorph } - -{ #category : #'*Spec-Inspector' } -ImageMorph >> resize: newSize [ - - self form: (image scaledToSize: newSize) -]