--- a/MenuPanel.st Sat Feb 07 17:40:26 1998 +0100
+++ b/MenuPanel.st Sat Feb 07 17:55:42 1998 +0100
@@ -1552,6 +1552,16 @@
].
!
+drawEdgesInLayout: layout withLevel: aLevel
+
+ self drawEdgesForX: layout left y: layout top width: layout width height: layout height level: aLevel
+ shadow: buttonShadowColor
+ light: buttonLightColor
+ halfShadow: buttonHalfShadowColor
+ halfLight: buttonHalfLightColor
+ style: ButtonEdgeStyle
+!
+
mustRearrange
"returns true if layout of items must be recomputed
"
@@ -3453,27 +3463,10 @@
!MenuPanel::Item methodsFor:'drawing'!
-drawButtonFrame
- "draw a Button frame around the item
- "
- |buttonLevel "{ Class:SmallInteger }"|
-
- (self isSelected or: [self hasIndication and: [self indicationValue]])
- ifFalse:[buttonLevel := menuPanel buttonPassiveLevel]
- ifTrue: [buttonLevel := menuPanel buttonActiveLevel].
-
- menuPanel drawEdgesForX: layout left y: layout top width: layout width height: layout height level: buttonLevel
- shadow: menuPanel buttonShadowColor
- light: menuPanel buttonLightColor
- halfShadow: menuPanel buttonHalfShadowColor
- halfLight: menuPanel buttonHalfLightColor
- style: menuPanel buttonEdgeStyle
-!
-
drawLabel
"draw label
"
- |y x h l t scKey cLb cLa img fg asc arrow hrzInset|
+ |y x h l t scKey cLb cLa img fg asc arrow hrzInset buttonLevel|
img := rawLabel.
asc := menuPanel font ascent.
@@ -3505,12 +3498,14 @@
ifTrue:
[
img displayOn:menuPanel x:(l + hrzInset) + 1 y: y + 1.
+ buttonLevel := menuPanel buttonActiveLevel
]
ifFalse:
[
img displayOn:menuPanel x:(l + hrzInset) y:y.
+ buttonLevel := menuPanel buttonPassiveLevel
].
- self drawButtonFrame.
+ menuPanel drawEdgesInLayout: layout withLevel: buttonLevel
]
ifFalse:
[
@@ -3550,6 +3545,7 @@
menuPanel paint:cLb.
menuPanel displayForm:img x:x y:y.
]
+
!
redraw
@@ -4369,6 +4365,6 @@
!MenuPanel class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg2/MenuPanel.st,v 1.71 1998-02-07 11:40:49 ca Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg2/MenuPanel.st,v 1.72 1998-02-07 16:55:42 tz Exp $'
! !
MenuPanel initialize!