fix drag-all-under mode in cards, and add some missing resize-box separators

svn: r5556
This commit is contained in:
Matthew Flatt 2007-02-06 05:11:55 +00:00
parent a8d631cbab
commit 6325a359f0
4 changed files with 16 additions and 3 deletions

View File

@ -40,6 +40,7 @@
[dragging? #f] [dragging? #f]
[bg-click? #f] [bg-click? #f]
[click-base #f] [click-base #f]
[last-click #f]
[regions null]) [regions null])
(private (private
[get-snip-bounds [get-snip-bounds
@ -253,9 +254,17 @@
(override (override
[on-default-event [on-default-event
(lambda (e) (lambda (e)
(let ([click (or (and (send e button-down? 'left) 'left) (let ([click (let ([c (or (and (send e button-down? 'left) 'left)
(and (send e button-down? 'right) 'right) (and (send e button-down? 'right) 'right)
(and (send e button-down? 'middle) 'middle))]) (and (send e button-down? 'middle) 'middle))])
(cond
[(eq? c last-click) c]
[(not last-click) c]
;; Move/drag event has different mouse button,
;; and there was no mouse up. Don't accept the
;; click, yet.
[else #f]))])
(set! last-click click)
(when click (when click
(let* ([actions (cdr (assoc click button-map))] (let* ([actions (cdr (assoc click button-map))]
[one? (list-ref actions 0)] [one? (list-ref actions 0)]

View File

@ -164,6 +164,7 @@
(get-piece-draw-fn p (send board enabled? p)))) (get-piece-draw-fn p (send board enabled? p))))
(send board get-pieces)) (send board get-pieces))
(send board refresh))))) (send board refresh)))))
(new grow-box-spacer-pane% [parent hp])
(send texture-box set-value #t) (send texture-box set-value #t)
(define q (define q

View File

@ -380,6 +380,8 @@
(send mode set-selection (if smart? 0 1)) (send mode set-selection (if smart? 0 1))
(send d center) (send d center)
(send d show #t)))]) (send d show #t)))])
(new grow-box-spacer-pane% [parent bottom])
;; Extra controls ---------------------------------------- ;; Extra controls ----------------------------------------

View File

@ -1796,6 +1796,7 @@
(min-height 480) (min-height 480)
(stretchable-width #f) (stretchable-width #f)
(stretchable-height #f) (stretchable-height #f)
(style '(no-resize-border))
) )
) )