MenuEditor.st
changeset 2835 383fc6922db1
parent 2833 c4e0add90aaa
child 2839 25c0162deb43
--- 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