changeset 185:83241889daac

BorderBox: properly wrap Geometry of the center view.
author Mikhail Kryshen <mikhail@kryshen.net>
date Tue, 21 Nov 2017 19:06:25 +0300
parents 292d885a5a7b
children bf1f63968d85
files src/indyvon/views.clj
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line diff
     1.1 --- a/src/indyvon/views.clj	Mon Nov 20 16:50:00 2017 +0300
     1.2 +++ b/src/indyvon/views.clj	Tue Nov 21 19:06:25 2017 +0300
     1.3 @@ -213,17 +213,17 @@
     1.4            sg (geometry south)
     1.5            eg (geometry east)
     1.6            cg (geometry center)
     1.7 -          cw (width cg)
     1.8 -          ch (max (height cg) (height wg) (height eg))
     1.9 +          cw0 (width cg)
    1.10 +          ch0 (height cg)
    1.11 +          ch (max ch0 (height wg) (height eg))
    1.12            l (width wg ch)
    1.13            r (width eg ch)
    1.14 -          w (max (+ cw l r) (width ng) (width sg))
    1.15 -          cw (- w l r)
    1.16 +          w (max (+ cw0 l r) (width ng) (width sg))
    1.17            t (height ng w)
    1.18            b (height sg w)
    1.19            h (+ ch t b)]
    1.20        (if center-anchor?
    1.21 -        (->NestedGeometry (->Size cw ch) t l b r)
    1.22 +        (->NestedGeometry cg t l (- h ch0 t) (- w cw0 l))
    1.23          (->Size w h)))))
    1.24  
    1.25  (defn border-box