From: slava Date: Sat, 14 Oct 2006 01:45:24 +0000 (+0000) Subject: Fix list selection X-Git-Url: https://gitweb.factorcode.org/gitweb.cgi?p=factor.git;a=commitdiff_plain;h=b407e32d7d99288dcae2b70b4fa47059b6e3eb92 Fix list selection --- diff --git a/TODO.FACTOR.txt b/TODO.FACTOR.txt index 4f3317d188..a2f69a6ca4 100644 --- a/TODO.FACTOR.txt +++ b/TODO.FACTOR.txt @@ -4,7 +4,6 @@ - help responder has no way to access { "foo" "bar" } - httpd search tools - polish OS X menu bar code -- list selection broken + ui: diff --git a/library/ui/gadgets/lists.factor b/library/ui/gadgets/lists.factor index c35b09c0ec..a9b67f2003 100644 --- a/library/ui/gadgets/lists.factor +++ b/library/ui/gadgets/lists.factor @@ -30,10 +30,10 @@ M: list model-changed [ nth ] [ 2drop f ] if ; M: list draw-gadget* - dup list-color gl-color - selected-rect [ - rect-bounds >r origin get v+ r> gl-fill-rect - ] when* ; + origin get [ + dup list-color gl-color + selected-rect [ rect-extent gl-fill-rect ] when* + ] with-translation ; M: list focusable-child* drop t ;