Launcher.st
changeset 1106 650465f9b173
parent 1105 eff690a9d837
child 1108 75a3e4f9a21a
--- a/Launcher.st	Fri Mar 28 22:46:20 1997 +0100
+++ b/Launcher.st	Sat Mar 29 12:39:08 1997 +0100
@@ -1400,30 +1400,26 @@
 displaySettings
     "open a dialog on display related settings"
 
-    |box 
+    |box listOfSizes sizeInfos
      sizes sizeNames sizeList sizeX sizeY deepIcons
      isColorMonitor useFixPalette idx ditherStyles ditherSyms ditherList
      y component screen visual|
 
-    sizeNames := #(
-                        '9''    (212mm x 160mm) GAS plasma/LCD'
-                        '11.3'' (235mm x 175mm) LCD'
-                        '16''   (275mm x 208mm)'
-                        '17''   (315mm x 245mm) SUN ELC'
-                        '17''   (325mm x 245mm)'
-                        '19''   (340mm x 270mm) (NCD)'
-                        '20''   (350mm x 280mm) (SGI)'
-                        '21''   (365mm x 285mm) (Eizo / Nanao)'
+    listOfSizes := resources at:'LIST_OF_OFFERED_SCREEN_SIZES' default:#default.
+    listOfSizes == #default ifTrue:[
+        "/ nothing in resource file; offer at least some.
+        sizeInfos := #(
+                           ( '11.3'' (235mm x 175mm) LCD'   (235 175)    )
+                           ( '17''   (325mm x 245mm)'       (325 245)    )
+                           ( '19''   (340mm x 270mm)'       (340 270)    )
+                           ( '20''   (350mm x 280mm)'       (350 280)    )
+                           ( '21''   (365mm x 285mm)'       (365 285)    )
                        ).
-    sizes := #(      (212 160)
-                     (235 175)
-                     (275 208)
-                     (315 245)
-                     (325 245)
-                     (340 270)
-                     (350 280)
-                     (365 285)
-                   ).
+    ] ifFalse:[
+        sizeInfos := resources array:listOfSizes.
+    ].
+    sizeNames := sizeInfos collect:[:entry | entry at:1].
+    sizes := sizeInfos collect:[:entry | entry at:2].
 
     screen := Screen current.
     visual := screen visualType.
@@ -1561,7 +1557,7 @@
     box destroy
 
     "Modified: 9.9.1996 / 22:43:04 / stefan"
-    "Modified: 1.3.1997 / 02:06:13 / cg"
+    "Modified: 29.3.1997 / 12:18:59 / cg"
 !
 
 fontSettings
@@ -4149,6 +4145,7 @@
     buttonPanel := HorizontalPanelView in:aTopView.
     buttonPanel level:-1; borderWidth:0.
     buttonPanel horizontalLayout:#leftSpace.
+"/    buttonPanel verticalLayout:#centerSpace.
 
     buttonSize := self class buttonImageSize.
 
@@ -4161,14 +4158,13 @@
     "/   #( nil )
     "/
     self buttonPanelSpec do:[:entry |
-        |sel b sep img iconSpec|
+        |sel b sep img iconSpec v|
 
         sel := entry at:1.
         sel isNil ifTrue:[
             sep := View in:buttonPanel.
             sep extent:32@1; borderWidth:0.
         ] ifFalse:[
-            b := Button in:buttonPanel.
             iconSpec := entry at:2.
             iconSpec isArray ifTrue:[
                 img := (Smalltalk classNamed:(iconSpec at:1)) perform:(iconSpec at:2).
@@ -4180,8 +4176,26 @@
                     img := img magnifiedTo:buttonSize       
                 ]
             ].
+
+            b := Button new.
             b form:img.
-            b model:self; changeMessage:sel
+            b model:self; changeMessage:sel.
+
+            b styleSheet name = 'win95' ifTrue:[
+                v := View in:buttonPanel.
+                v addSubView:b.
+                v level:-1.
+                b passiveLevel:1; activeLevel:-1.
+                v extent:(b preferredExtent 
+                          + b borderWidth + b borderWidth 
+                          + b margin + b margin 
+                          + v margin + v margin).
+                v preferredExtent:v extent.
+                b origin:(v margin asPoint).
+                b enteredBackgroundColor:(Color grey:80).
+            ] ifFalse:[
+                buttonPanel addSubView:b.
+            ].
         ]
     ].
 
@@ -4191,7 +4205,7 @@
 
     buttonPanel leftInset:spc; rightInset:spc.
 
-    "Modified: 29.5.1996 / 19:23:04 / cg"
+    "Modified: 29.3.1997 / 12:37:39 / cg"
 !
 
 setupInfoViewIn:topView 
@@ -4634,5 +4648,5 @@
 !Launcher class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Launcher.st,v 1.258 1997-03-28 21:46:20 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Launcher.st,v 1.259 1997-03-29 11:39:08 cg Exp $'
 ! !