equal
deleted
inserted
replaced
922 |
922 |
923 self resourceType isNil ifTrue: [^nil]. |
923 self resourceType isNil ifTrue: [^nil]. |
924 icon isNil |
924 icon isNil |
925 ifTrue: |
925 ifTrue: |
926 [ |
926 [ |
927 |cls sel image imageKey| |
927 |cls sel image imageKey| |
928 ((self resourceType = #image) or: [resourceType = #fileImage]) |
928 ((self resourceType = #image) or: [resourceType = #fileImage]) |
929 ifTrue: |
929 ifTrue: |
930 [ |
930 [ |
931 cls := method who methodClass soleInstance. |
931 cls := method who methodClass soleInstance. |
932 sel := method who methodSelector. |
932 sel := method who methodSelector. |
933 ] |
933 ] |
934 ifFalse: |
934 ifFalse: |
935 [ |
935 [ |
936 cls := BrowserView. |
936 cls := SystemBrowser. |
937 sel := (resourceType, 'Icon') asSymbol. |
937 sel := (resourceType, 'Icon') asSymbol. |
938 ]. |
938 ]. |
939 imageKey := (cls name, sel) asSymbol. |
939 imageKey := (cls name, sel) asSymbol. |
940 (icon := aGC registeredImageAt: imageKey) isNil |
940 (icon := aGC registeredImageAt: imageKey) isNil |
941 ifTrue: |
941 ifTrue: |
942 [ |
942 [ |
943 image := cls perform: sel. |
943 image := cls perform: sel. |
944 image extent y > 18 |
944 image extent y > 18 |
945 ifTrue: |
945 ifTrue: |
946 [ |
946 [ |
947 image := image magnifiedBy: 18/image extent y |
947 image := image magnifiedBy: 18/image extent y |
948 ]. |
948 ]. |
949 aGC registerImage: image key: imageKey. |
949 aGC registerImage: image key: imageKey. |
950 icon := aGC registeredImageAt: imageKey. |
950 icon := aGC registeredImageAt: imageKey. |
951 ]. |
951 ]. |
952 ]. |
952 ]. |
953 ^icon |
953 ^icon |
954 ! |
954 ! |
955 |
955 |
956 method: aMethod |
956 method: aMethod |