fixed problem with an odd number of titlebars

This commit is contained in:
frese 2003-05-19 12:15:09 +00:00
parent 761550d241
commit 5f10ad3350
1 changed files with 4 additions and 4 deletions

View File

@ -165,14 +165,14 @@
(make-rectangle 0 0 width titlebar-height))
(let* ((titlebars (map cdr (data:titlebars data)))
(n (length titlebars))
(dw (if (zero? n) 0 (quotient width n)))
(widths (if (zero? n) '()
(let ((dw (quotient width n)))
(append (map (lambda (_) dw) (iota (- n 1)))
(list (- width (* dw (- n 1)))))))))
(append (map (lambda (_) dw) (iota (- n 1)))
(list (- width (* dw (- n 1))))))))
(for-each (lambda (i width titlebar)
(move-resize-titlebar
titlebar
(make-rectangle (* i width) 0
(make-rectangle (* i dw) 0
width titlebar-height)))
(iota n) widths titlebars))))))