# HG changeset patch # User Claus Gittinger # Date 1297077994 -3600 # Node ID 383fc6922db19228f6391506295d0c0dc57ee778 # Parent 17642ce40cc4a05c2b0fd849633bc5057052edcc oops diff -r 17642ce40cc4 -r 383fc6922db1 MenuEditor.st --- a/MenuEditor.st Tue Feb 01 11:58:03 2011 +0100 +++ b/MenuEditor.st Mon Feb 07 12:26:34 2011 +0100 @@ -5590,24 +5590,31 @@ ! fromClass:aClass selector:aSelector - |w h magnify| + |w h magnify iconOrSymbol| selector := aSelector asSymbol. selector numArgs == 0 ifFalse:[^ self]. - icon := aClass perform:selector. + iconOrSymbol := aClass perform:selector. + iconOrSymbol isSymbol ifTrue:[ + icon := ToolbarIconLibrary perform:iconOrSymbol. + ] ifFalse:[ + icon := iconOrSymbol. + ]. w := icon width. h := icon height. w > 32 ifTrue:[ - magnify := 32 / w. - h > 32 ifTrue:[ magnify := (32 / h) max:magnify ]. + magnify := 32 / w. + h > 32 ifTrue:[ magnify := (32 / h) max:magnify ]. ] ifFalse:[ - h > 32 ifFalse:[^ self]. - magnify := 32 / h. + h > 32 ifFalse:[^ self]. + magnify := 32 / h. ]. icon := icon magnifiedBy: magnify. + + "Modified: / 07-02-2011 / 12:26:04 / cg" ! initialize