smaller checkbox.
--- a/MenuPanel.st Tue Sep 08 13:28:54 1998 +0200
+++ b/MenuPanel.st Tue Sep 08 13:37:09 1998 +0200
@@ -3263,8 +3263,11 @@
<resource: #image>
^Icon
- constantNamed:#'MenuPanel::Item checkedImage'
- ifAbsentPut:[(Depth2Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'*****X@@@@FEUUUQ!!UUTDXUUVAFEUUBQ!!UU TXPUP%FDAXEQ!!0DITXW@AUFE\BUQ!!U0UTXUUUUF@@@@AUUUUUP@a') ; colorMapFromArray:#[0 0 0 255 255 255 127 127 127 170 170 170]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'?????_?=??7??_?=??7??_?=??7??_?=??7??X@A??<b') ; yourself); yourself]!
+ constantNamed:#'MenuPanel::Item checkedImage'
+ ifAbsentPut:[(Depth2Image new) width: 14; height: 14; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'****$H@@@MBEUUWP!!UUU4HUUT]BEUTGP!!ETA4HPTA]BD@AWP!!PAU4HUAU]BEUUWP/???4EUUUU@b') ; colorMapFromArray:#[0 0 0 255 255 255 127 127 127 170 170 170]; mask:((Depth1Image new) width: 14; height: 14; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'??3??O?<??3??O?<??3??O?<??3??O?<??3??@@a') ; yourself); yourself]
+
+ "Modified: / 6.9.1998 / 22:29:58 / cg"
+!
uncheckedImage
"This resource specification was automatically generated
@@ -3281,8 +3284,11 @@
<resource: #image>
^Icon
- constantNamed:#'MenuPanel::Item uncheckedImage'
- ifAbsentPut:[(Depth2Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'UUUUUG????10@@@L\@@@CG@@@@10@@@L\@@@CG@@@@10@@@L\@@@CG@@@@10@@@L\@@@CG@@@@1????<@@@@@@@a') ; colorMapFromArray:#[255 255 255 127 127 127 170 170 170 0 0 0]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'?????_?=??7??_?=??7??_?=??7??_?=??7??X@A??<b') ; yourself); yourself]! !
+ constantNamed:#'MenuPanel::Item uncheckedImage'
+ ifAbsentPut:[(Depth2Image new) width: 14; height: 14; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'UUUUPG???8A0@@B@\@@@ G@@@HA0@@B@\@@@ G@@@HA0@@B@\@@@ G@@@HA0@@B@Z*** @@@@@@b') ; colorMapFromArray:#[255 255 255 127 127 127 170 170 170 0 0 0]; mask:((Depth1Image new) width: 14; height: 14; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'??3??O?<??3??O?<??3??O?<??3??O?<??3??@@a') ; yourself); yourself]
+
+ "Modified: / 6.9.1998 / 22:24:24 / cg"
+! !
!MenuPanel::Item class methodsFor:'instance creation'!
@@ -4041,14 +4047,14 @@
isSelected := self drawSelected.
self enabled ifTrue:[
- fg := isSelected ifTrue:[self activeForegroundColor]
- ifFalse:[menuPanel foregroundColor].
+ fg := isSelected ifTrue:[self activeForegroundColor]
+ ifFalse:[menuPanel foregroundColor].
] ifFalse:[
- fg := menuPanel disabledForegroundColor.
-
- (img := disabledRawLabel) isNil ifTrue:[
- img := self disabledRawLabel
- ]
+ fg := menuPanel disabledForegroundColor.
+
+ (img := disabledRawLabel) isNil ifTrue:[
+ img := self disabledRawLabel
+ ]
].
menuPanel paint:fg.
@@ -4056,27 +4062,29 @@
y := t + ((h - (img heightOn:menuPanel)) // 2).
(self textLabel) notNil ifTrue:[
- y := y + asc.
+ y := y + asc.
].
isButton ifTrue:[
- (isSelected or:[self indicationValue == true]) ifTrue:
- [
- img displayOn:menuPanel x:(l + hrzInset) + 1 y: y + 1.
- buttonLevel := menuPanel buttonActiveLevel.
- ] ifFalse:[
- img displayOn:menuPanel x:(l + hrzInset) y:y.
- self isEntered ifTrue:[
- buttonLevel := menuPanel buttonEnteredLevel
- ] ifFalse:[
- buttonLevel := menuPanel buttonPassiveLevel
- ]
- ].
- menuPanel
- drawButtonEdgesInLayout:layout
- withLevel:buttonLevel
- selected:isSelected.
- ^ self
+ (isSelected or:[self indicationValue == true]) ifTrue:
+ [
+ img displayOn:menuPanel x:(l + hrzInset) + 1 y: y + 1.
+ buttonLevel := menuPanel buttonActiveLevel.
+ ] ifFalse:[
+ img displayOn:menuPanel x:(l + hrzInset) y:y.
+ self isEntered ifTrue:[
+ buttonLevel := menuPanel buttonEnteredLevel
+ ] ifFalse:[
+ buttonLevel := menuPanel buttonPassiveLevel
+ ]
+ ].
+ buttonLevel ~~ 0 ifTrue:[
+ menuPanel
+ drawButtonEdgesInLayout:layout
+ withLevel:buttonLevel
+ selected:isSelected.
+ ].
+ ^ self
].
"/ label = 'Sort By Name' ifTrue:[self halt.].
@@ -4086,45 +4094,45 @@
"/ DRAW SHORTCUT KEY
MenuView showAcceleratorKeys == true ifTrue:[
- menuPanel isVerticalLayout ifTrue:[ "/ only for vertical menus ...
- (scKey:= self shortcutKeyAsString) notNil ifTrue:[
- (x := menuPanel shortKeyInset) == 0 ifTrue:[
- x := hrzInset + LabelRightOffset + (img widthOn:menuPanel)
- ].
- x := l + x.
- y := t + ((h - (scKey heightOn:menuPanel)) // 2).
- y := y + asc.
- scKey displayOn:menuPanel x:x y:y.
- ].
- ].
+ menuPanel isVerticalLayout ifTrue:[ "/ only for vertical menus ...
+ (scKey:= self shortcutKeyAsString) notNil ifTrue:[
+ (x := menuPanel shortKeyInset) == 0 ifTrue:[
+ x := hrzInset + LabelRightOffset + (img widthOn:menuPanel)
+ ].
+ x := l + x.
+ y := t + ((h - (scKey heightOn:menuPanel)) // 2).
+ y := y + asc.
+ scKey displayOn:menuPanel x:x y:y.
+ ].
+ ].
].
"/ DRAW SUBMENU INDICATION
(menuPanel isVerticalLayout and:[self submenu notNil]) ifTrue:[
- arrow := menuPanel rightArrow.
- x := layout right - arrow width - hrzInset.
- y := t + (h - arrow height // 2).
-
- (menuPanel styleSheet is3D not
- or:[(img := menuPanel rightArrowShadow) isNil]) ifTrue:[
- ^ menuPanel displayForm:arrow x:x y:y
- ].
- cLa := menuPanel shadowColor.
- cLb := menuPanel lightColor.
-
- isSelected ifFalse:[
- fg := cLa.
- cLa := cLb.
- cLb := fg
- ].
- menuPanel paint:cLa.
- menuPanel displayForm:arrow x:x y:y.
- menuPanel paint:cLb.
- menuPanel displayForm:img x:x y:y.
+ arrow := menuPanel rightArrow.
+ x := layout right - arrow width - hrzInset.
+ y := t + (h - arrow height // 2).
+
+ (menuPanel styleSheet is3D not
+ or:[(img := menuPanel rightArrowShadow) isNil]) ifTrue:[
+ ^ menuPanel displayForm:arrow x:x y:y
+ ].
+ cLa := menuPanel shadowColor.
+ cLb := menuPanel lightColor.
+
+ isSelected ifFalse:[
+ fg := cLa.
+ cLa := cLb.
+ cLb := fg
+ ].
+ menuPanel paint:cLa.
+ menuPanel displayForm:arrow x:x y:y.
+ menuPanel paint:cLb.
+ menuPanel displayForm:img x:x y:y.
]
- "Modified: / 22.8.1998 / 18:32:28 / cg"
+ "Modified: / 6.9.1998 / 21:48:53 / cg"
!
drawSelected
@@ -5185,6 +5193,6 @@
!MenuPanel class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg2/MenuPanel.st,v 1.125 1998-09-08 10:17:48 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg2/MenuPanel.st,v 1.126 1998-09-08 11:37:09 cg Exp $'
! !
MenuPanel initialize!