MenuPanel.st
branchjv
changeset 5197 4c7442c47ab5
parent 5130 436b5fa0e195
parent 5193 a3a380b5f148
child 5198 ef905f5eb4fc
--- a/MenuPanel.st	Thu Jun 09 08:36:00 2016 +0100
+++ b/MenuPanel.st	Tue Aug 02 08:34:04 2016 +0100
@@ -29,11 +29,12 @@
 		buttonPassiveBackgroundColor maxExtent sizeFixed extraMargin
 		buttonActiveLevel buttonPassiveLevel buttonEnteredLevel
 		pluggableHelpSpecProvider'
-	classVariableNames:'InitialSelectionQuerySignal Images LigthenedImages
-		DefaultForegroundColor DefaultBackgroundColor IconIndicationOn
-		IconIndicationOff IconRadioOn IconRadioOff
-		IconDisabledIndicationOn IconDisabledIndicationOff
-		IconDisabledRadioOn IconDisabledRadioOff MaxShortCutSearchLevel'
+	classVariableNames:'DefaultBackgroundColor DefaultForegroundColor
+		IconDisabledIndicationOff IconDisabledIndicationOn
+		IconDisabledRadioOff IconDisabledRadioOn IconIndicationOff
+		IconIndicationOn IconRadioOff IconRadioOn Images
+		InitialSelectionQuerySignal LigthenedImages
+		MaxShortCutSearchLevel'
 	poolDictionaries:''
 	category:'Views-Menus'
 !
@@ -1752,13 +1753,13 @@
 selectionFrameBrightColor
     "get the selection frame bright color"
 
-    ^ Color white
+    ^ self whiteColor
 !
 
 selectionFrameDarkColor
     "get the selection frame dark color"
 
-    ^ Color black
+    ^ self blackColor
 !
 
 setFont:aFont
@@ -2739,12 +2740,12 @@
     |lytItem|
 
     lytItem := anItem layout.
-    self paint:(Color black).
+    self paint:(self blackColor).
 
     self displayDottedRectangleX:(lytItem left)
-			       y:(lytItem top)
-			   width:(lytItem width)
-			  height:(lytItem height).
+                               y:(lytItem top)
+                           width:(lytItem width)
+                          height:(lytItem height).
 !
 
 drawItemsX:x y:y width:w height:h
@@ -2925,13 +2926,13 @@
     |oldPref|
 
     mustRearrange ifFalse:[
-	oldPref := preferredExtent.
-	preferredExtent := nil.
-	mustRearrange := true.
-	self invalidate. "/ RepairNow:true
-	(oldPref notNil and:[oldPref ~= self preferredExtent]) ifTrue:[
-	    self changed:#preferredExtent
-	].
+        oldPref := preferredExtent.
+        preferredExtent := nil.
+        mustRearrange := true.
+        self invalidate. "/ RepairNow:true
+        (oldPref notNil and:[oldPref ~= self preferredExtent]) ifTrue:[
+            dependents notNil ifTrue:[ self changed:#preferredExtent ]
+        ].
     ]
 
     "Modified: / 6.6.1998 / 19:51:07 / cg"
@@ -3596,7 +3597,7 @@
     super mapped.
 
     "/ if I come up with a pressed button, react on release instead.
-    device anyButtonPressed ifTrue:[ hideOnRelease := true ].
+    gc device anyButtonPressed ifTrue:[ hideOnRelease := true ].
 !
 
 mouseWheelMotion:buttonState x:x y:y amount:amount deltaTime:dTime
@@ -4483,7 +4484,7 @@
     pluggableHelpSpecProvider notNil ifTrue:[
         ^ pluggableHelpSpecProvider flyByHelpSpec.
     ].    
-    ^ nil
+    ^ Dictionary new.
 !
 
 flyByHelpSpecProvider:aSpecProvider
@@ -4860,23 +4861,23 @@
     "update level & border"
 
     <resource: #style (#'popup.borderWidth'
-		       #'popup.borderColor'
-		       #'popup.level'
-		       #'pullDownMenu.level'
-		       )>
+                       #'popup.borderColor'
+                       #'popup.level'
+                       #'pullDownMenu.level'
+                       )>
 
     |bw bc lvl|
 
     self isPopUpView ifTrue:[
-	bw  := styleSheet at:#'popup.borderWidth' default:1.
-	lvl := styleSheet at:#'popup.level'       default:0.
+        bw  := styleSheet at:#'popup.borderWidth' default:1.
+        lvl := styleSheet at:#'popup.level'       default:0.
     ] ifFalse:[
-	bw  := styleSheet is3D ifFalse:[1] ifTrue:[0].
-	lvl := styleSheet at:#'pullDownMenu.level' default:1.
+        bw  := styleSheet is3D ifFalse:[1] ifTrue:[0].
+        lvl := styleSheet at:#'pullDownMenu.level' default:1.
     ].
     bw ~~ 0 ifTrue:[
-	bc  := styleSheet at:#'popup.borderColor' default:Color black.
-	self borderColor:bc
+        bc  := styleSheet at:#'popup.borderColor' default:self blackColor.
+        self borderColor:bc
     ].
     self borderWidth:bw.
     self level:lvl.
@@ -5161,11 +5162,11 @@
     aStream nextPutAll:'Menu:'.
 
     self do:[:eachItem|
-	label  := eachItem label.
-	label notEmptyOrNil ifTrue:[
-	    aStream nextPutAll:'  '.
-	    label printOn:aStream.
-	].
+        label := eachItem label.
+        label notEmptyOrNil ifTrue:[
+            aStream nextPutAll:'  '.
+            label printOn:aStream.
+        ].
     ].
 ! !