diff -r 9b7170da2f9f -r 28861484ed47 Launcher.st --- a/Launcher.st Tue Jan 11 17:33:24 2000 +0100 +++ b/Launcher.st Tue Jan 11 18:06:39 2000 +0100 @@ -1509,62 +1509,65 @@ "/ #( nil ) "/ self buttonPanelSpec do:[:entry | - |sel b sep img iconSpec v| + |sel b sep img iconSpec v| - sel := entry at:1. - sel isNil ifTrue:[ - sep := View in:buttonPanel. - sep extent:32@1; borderWidth:0. - ] ifFalse:[ - iconSpec := entry at:2. - iconSpec isArray ifTrue:[ - img := (Smalltalk classNamed:(iconSpec at:1)) perform:(iconSpec at:2). - ] ifFalse:[ - img := Image fromFile:iconSpec. - ]. - (img notNil and:[buttonSize notNil]) ifTrue:[ - img extent ~= buttonSize ifTrue:[ - img := img magnifiedTo:buttonSize - ] - ]. + sel := entry at:1. + sel isNil ifTrue:[ + sep := View in:buttonPanel. + sep extent:32@1; borderWidth:0. + ] ifFalse:[ + iconSpec := entry at:2. + iconSpec isArray ifTrue:[ + img := (Smalltalk classNamed:(iconSpec at:1)) perform:(iconSpec at:2). + ] ifFalse:[ + img := Smalltalk imageFromFileNamed:iconSpec forClass:self class. + img isNil ifTrue:[ + img := Smalltalk imageFromFileNamed:iconSpec forClass:Launcher. + ] + ]. + (img notNil and:[buttonSize notNil]) ifTrue:[ + img extent ~= buttonSize ifTrue:[ + img := img magnifiedTo:buttonSize + ] + ]. - b := Button new. - b form:img. - b model:self; changeMessage:sel. - - b styleSheet name = 'win95' ifTrue:[ + b := Button new. + b form:img. + b model:self; changeMessage:sel. - false ifTrue:[ - "/ make buttons flat, popping up when entered ... + b styleSheet name = 'win95' ifTrue:[ + + false ifTrue:[ + "/ make buttons flat, popping up when entered ... - b enterLevel: 1. - b leaveLevel: 0. - buttonPanel addSubView:b. + b enterLevel: 1. + b leaveLevel: 0. + buttonPanel addSubView:b. - ] ifFalse:[ - "/ make buttons flat, but given them a 3D frame ... + ] ifFalse:[ + "/ make buttons flat, but given them a 3D frame ... - 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. - ]. - ] + 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. + ]. + ] ]. mh := myMenu height. buttonPanel origin:0.0 @ (mh + spc) - corner:(1.0 @ (mh + spc + buttonPanel preferredExtent y)). + corner:(1.0 @ (mh + spc + buttonPanel preferredExtent y)). buttonPanel leftInset:spc; rightInset:spc. @@ -1715,5 +1718,5 @@ !Launcher class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libtool/Launcher.st,v 1.403 1999-10-28 15:52:32 cg Exp $' + ^ '$Header: /cvs/stx/stx/libtool/Launcher.st,v 1.404 2000-01-11 17:06:39 cg Exp $' ! !