Author: junrue Date: Sun Jun 4 02:52:57 2006 New Revision: 148
Modified: trunk/src/uitoolkit/widgets/flow-layout.lisp Log: flow-layout bug fix
Modified: trunk/src/uitoolkit/widgets/flow-layout.lisp ============================================================================== --- trunk/src/uitoolkit/widgets/flow-layout.lisp (original) +++ trunk/src/uitoolkit/widgets/flow-layout.lisp Sun Jun 4 02:52:57 2006 @@ -119,7 +119,7 @@ (if (< (flow-data-max-extent state) extent) (setf (flow-data-max-extent state) extent)) (push (list kid size) (flow-data-kid-sizes state)))) - (nreverse (flow-data-kid-sizes state)) + (setf (flow-data-kid-sizes state) (reverse (flow-data-kid-sizes state))) state))
(defun wrap-needed-p (state layout kid-size) @@ -134,7 +134,6 @@ (setf (flow-data-current state) nil) (setf (flow-data-next-coord state) (funcall (flow-data-start-margin-fn state) layout)) (incf (flow-data-wrap-coord state) (+ (flow-data-max-extent state) (flow-data-spacing state))) - (setf (flow-data-max-extent state) 0) (reverse curr-flow)))
(defun new-flow-element (state layout kid kid-size) @@ -164,8 +163,7 @@
(defun flow-container-layout (layout visible kids width-hint height-hint) (let ((flows nil) - (state (init-flow-data layout visible kids width-hint height-hint)) - (max-distance 0)) + (state (init-flow-data layout visible kids -1 -1))) (loop with wrap = (find :wrap (style-of layout)) for (kid kid-size) in (flow-data-kid-sizes state) do (if (and wrap (wrap-needed-p state layout kid-size))