[BUG FIX] ScrollPane focus frame drawing
Tim Olson
tim at jump.net
Thu May 9 13:10:33 UTC 2002
I had been noticing an annoying drawing interaction with the ScrollPane
focus frame and the reframe handle drawing:
When you move the cursor slowly out of a ScrollPane, the focus frame
remains until you transition into another frame to change focus.
However, if you move out on an edge that can be reframed, the reframing
code causes a partial redraw of the ScrollPane contents, and since the
ScrollPane doesn't have focus, the partial redraw doesn't draw the focus
frame, leaving an ugly gap in the focus frame (try slowly moving the
cursor back and forth across the bottom edge of the leftmost pane [class
category pane] of a Browser window).
A solution is to remove the focus frame immediately upon mouseLeave, by
sending a self changed message:
ScrollPane>>mouseLeave: event
hasFocus _ false.
self changed. "added to redraw without focus frame"
retractableScrollBar
ifTrue: [self hideScrollBar].
(owner isKindOf: SystemWindow)
ifTrue: [owner paneTransition: event]
This fixes the annoying drawing problem. But now there is a much less
annoying "focus frame flash" when slowly entering into a ScrollPane along
a resizing edge.
-- tim
More information about the Squeak-dev
mailing list
|