Mercurial > hg > indyvon
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 wrap: on
line diff
--- a/src/indyvon/views.clj Mon Nov 20 16:50:00 2017 +0300 +++ b/src/indyvon/views.clj Tue Nov 21 19:06:25 2017 +0300 @@ -213,17 +213,17 @@ sg (geometry south) eg (geometry east) cg (geometry center) - cw (width cg) - ch (max (height cg) (height wg) (height eg)) + cw0 (width cg) + ch0 (height cg) + ch (max ch0 (height wg) (height eg)) l (width wg ch) r (width eg ch) - w (max (+ cw l r) (width ng) (width sg)) - cw (- w l r) + w (max (+ cw0 l r) (width ng) (width sg)) t (height ng w) b (height sg w) h (+ ch t b)] (if center-anchor? - (->NestedGeometry (->Size cw ch) t l b r) + (->NestedGeometry cg t l (- h ch0 t) (- w cw0 l)) (->Size w h))))) (defn border-box