anchor.diff:      (when armed
         (setf armed t
   	    (gadget-show-value-p pane) t
  -	    (gadget-value pane :invoke-callback t)
  -	    (convert-position-to-value pane (if (eq (gadget-orientation pane) :vertical)
  -						(pointer-event-y event)
  -						(pointer-event-x event))))
  +	    (gadget-value pane :invoke-callback t) (convert-position-to-value pane (pointer-event-y event)))
         (dispatch-repaint pane (sheet-region pane)))))
   
   (defmethod handle-event ((pane slider-pane) (event window-repaint-event))
     (dispatch-repaint pane (sheet-region pane)))
   
  -(defmethod convert-position-to-value ((pane slider-pane) position)
  +(defmethod convert-position-to-value ((pane slider-pane) y)
     (multiple-value-bind (x1 y1 x2 y2) (bounding-rectangle* (sheet-region pane))
  -    (if (eq (gadget-orientation pane) :vertical)
  -	(round (+ (gadget-min-value pane) (/ (* (gadget-range pane) (- y2 position)) (- y2 y1))))
  -	(round (+ (gadget-min-value pane) (/ (* (gadget-range pane) (+ x1 position)) (- x2 x1)))))))
  -
  -(defun orientation-dependent-draw (pane position x1 x2 y1 y2)
  -  (if (eq (slot-value pane 'orientation) :vertical)
  -      (let ((middle (round (- x2 x1) 2)))
  -	(draw-line* pane middle y1 middle y2 :ink +black+)
  -	(draw-rectangle* pane (- middle 15) (- position 5)
  -			 (+ middle 15) (+ position 5)
  -			 :ink +grey75+ :filled t)
  -	(draw-edges-lines* pane (- middle 15) (- position 5) (+ middle 15) (+ position 5))
  -	(when (gadget-show-value-p pane)
  -	  (draw-text* pane (princ-to-string (gadget-value pane))
  -			 (+ middle 20) position)))
  -      (let ((middle (round (- y2 y1) 2)))
  -	(draw-line* pane x1 middle x2 middle :ink +black+)
  -	(draw-rectangle* pane (- position 5) (- middle 15)
  -			 (+ position 5) (+ middle 15)
  -			 :ink +grey75+ :filled t)
  -	(draw-edges-lines* pane (- position 5) (- middle 15) (+ position 5) (+ middle 15))
  -	(when (gadget-show-value-p pane)
  -	  (draw-text* pane (princ-to-string (gadget-value pane))
  -		      position (+ middle 20))))))
  +    (declare (ignore x1 x2))
  +    (round (+ (gadget-min-value pane) (/ (* (gadget-range pane) (- y2 y)) (- y2 y1))))))
   
   (defmethod repaint-sheet ((pane slider-pane) region)
     (declare (ignore region))
     (let ((region (sheet-region pane))
   	(position (convert-value-to-position pane)))
       (multiple-value-bind (x1 y1 x2 y2) (bounding-rectangle* region)
  -      (with-double-buffering (pane)
  -        (display-gadget-background pane (gadget-current-color pane) 0 0 (- x2 x1) (- y2 y1))
  -	(orientation-dependent-draw pane position x1 x2 y1 y2)))))
  +      (let ((middle-x (round (- x2 x1) 2)))
  +	(display-gadget-background pane (gadget-current-color pane) 0 0 (- x2 x1) (- y2 y1))
  +	(draw-line* pane middle-x y1 middle-x y2 :ink +black+)
  +	(draw-rectangle* pane (- middle-x 15) (- position 5)
  +		       (+ middle-x 15) (+ position 5)
  +		       :ink +grey75+ :filled t)
  +	(draw-edges-lines* pane (- middle-x 15) (- position 5) (+ middle-x 15) (+ position 5))
  +	(when (gadget-show-value-p pane)
  +	  (draw-text* pane (princ-to-string (gadget-value pane))
  +		      (+ middle-x 20) position))))))
   
   (defmethod convert-value-to-position ((pane slider-pane))
     (multiple-value-bind (x1 y1 x2 y2) (bounding-rectangle* (sheet-region pane))
  -    (if (eq (gadget-orientation pane) :vertical)
  -	(- y2 (/ (* (- (gadget-value pane) (gadget-min-value pane)) (- y2 y1)) (gadget-range pane)))
  -	(+ x1 (/ (* (- (gadget-value pane) (gadget-min-value pane)) (- x2 x1)) (gadget-range pane))))))
  +    (declare (ignore x1 x2))
  +    (- y2 (/ (* (- (gadget-value pane) (gadget-min-value pane)) (- y2 y1)) (gadget-range pane)))))
  +
   
   ;;
   ;; RADIO-BOX gadget
  
positive.code: (defmethod handle-event ((pane push-button-pane) (event pointer-exit-event))
    (with-slots (armed) pane
      (when armed
        (setf (push-button-show-as-default-p pane) nil
  	    armed nil
  	    (gadget-current-color pane) (gadget-normal-color pane))
        (disarmed-callback pane (gadget-client pane) (gadget-id pane)))))
  
  
negative.code: 				:max-width 400 :max-height 400
  				:min-width tw :min-height th)))))
  
  (defmethod draw-label ((pane labelled-gadget) (label string) x y)
    (draw-text* pane label
  	      x y
  	      :align-x (gadget-label-align-x pane)
  	      :align-y (gadget-label-align-y pane)
  	      :text-style (gadget-label-text-style pane)))
  
  (defclass labelled-gadget-mixin (labelled-gadget)
    ;; Try to be compatible with Lispworks' CLIM.
    ())
  