cleanup icon code
authorClaus Gittinger <cg@exept.de>
Mon, 10 Jun 1996 21:38:20 +0200
changeset 615 ed4432c4d5c0
parent 614 561229d704f5
child 616 ae2685e7d843
cleanup icon code
Launcher.st
--- a/Launcher.st	Mon Jun 10 20:34:59 1996 +0200
+++ b/Launcher.st	Mon Jun 10 21:38:20 1996 +0200
@@ -2091,26 +2091,35 @@
 openInterface
     "sent by my superclass to open up my interface"
 
-    |top icn w|
+    |top icn w scrn sz|
 
     top := StandardSystemView new.
     top label:'Smalltalk/X'; iconLabel:'ST/X Launcher'.
     top extent:(400@300 ).
 
-    "
-     temporary kludge for SGI;
-     this will be moved into StandardSystemView and be done
-     automatically soon ...
-    "
-    Screen current serverVendor = 'Silicon Graphics' ifTrue:[
-        icn := self class aboutIcon.
-        icn notNil ifTrue:[
-            icn := icn magnifiedTo:86@68.
-            w := View extent:86@68. "/ icn extent.
-            w viewBackground:icn.
-            top iconView:w
-        ]
-    ].
+    icn := self class aboutIcon.
+    icn := icn magnifiedTo:(Screen current preferredIconSize).
+    top icon:icn.
+
+"/    (scrn := Screen current) supportsDeepIcons ifTrue:[
+"/        icn := self class aboutIcon.
+"/        icn notNil ifTrue:[
+"/            icn := icn magnifiedTo:(sz := scrn preferredIconSize).
+"/            icn := Depth8Image fromImage:icn.
+"/            top icon:icn
+"/        ].
+
+"/    ] ifFalse:[
+"/        scrn supportsIconViews ifTrue:[
+"/            icn := self class aboutIcon.
+"/            icn notNil ifTrue:[
+"/                icn := icn magnifiedTo:(sz := scrn preferredIconSize).
+"/                w := View extent:sz. 
+"/                w viewBackground:icn.
+"/                top iconView:w
+"/            ].
+"/        ]
+"/    ].
 
     self setupViewsIn:top.
 
@@ -2122,7 +2131,7 @@
     "
     top openWithPriority:(Processor userSchedulingPriority + 1).
 
-    "Modified: 18.4.1996 / 14:56:11 / cg"
+    "Modified: 10.6.1996 / 21:22:33 / cg"
 !
 
 release
@@ -2933,5 +2942,5 @@
 !NewLauncher class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Launcher.st,v 1.148 1996-06-10 18:34:59 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Launcher.st,v 1.149 1996-06-10 19:38:20 cg Exp $'
 ! !