fixed problem with an odd number of titlebars
This commit is contained in:
parent
761550d241
commit
5f10ad3350
|
@ -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))))))
|
||||
|
||||
|
|
Loading…
Reference in New Issue