round off width passed to rn-hole-view

This commit is contained in:
Siddarth Kumar 2024-09-06 09:21:21 +05:30
parent 02a1544005
commit d74530b0e2
No known key found for this signature in database
GPG Key ID: 599D10112BF518DB
4 changed files with 6 additions and 5 deletions

View File

@ -43,7 +43,8 @@
[] []
[{:x 20 [{:x 20
:y 108 :y 108
:width (- width 40) ;; https://github.com/status-im/status-mobile/pull/20950#issuecomment-2351505926
:width (- (int width) 40)
:height 50 :height 50
:borderRadius 16}])} :borderRadius 16}])}
[rn/view [rn/view

View File

@ -27,7 +27,7 @@
[rn/view {:on-layout on-layout} [rn/view {:on-layout on-layout}
[hole-view/hole-view [hole-view/hole-view
{:holes (if options {:holes (if options
[{:x (- container-width [{:x (- (int container-width)
(case size (case size
:size-24 10 :size-24 10
:size-32 12 :size-32 12

View File

@ -36,7 +36,7 @@
{:holes [{:x 0 {:holes [{:x 0
:y 0 :y 0
:height style/top-hole-view-height :height style/top-hole-view-height
:width container-width :width (int container-width)
:borderBottomStartRadius 16 :borderBottomStartRadius 16
:borderBottomEndRadius 16}] :borderBottomEndRadius 16}]
:style {:margin-top (- style/top-hole-view-height)} :style {:margin-top (- style/top-hole-view-height)}

View File

@ -29,7 +29,7 @@
[] []
[{:x 0 [{:x 0
:y constants/alert-banner-height :y constants/alert-banner-height
:width (:width (rn/get-window)) :width (int (:width (rn/get-window)))
:height constants/alert-banner-height :height constants/alert-banner-height
:borderRadius style/border-radius}])} :borderRadius style/border-radius}])}
[quo/text [quo/text
@ -54,7 +54,7 @@
{:style {:padding-bottom 0.5} {:style {:padding-bottom 0.5}
:holes [{:x 0 :holes [{:x 0
:y (+ safe-area-top (* constants/alert-banner-height banners-count)) :y (+ safe-area-top (* constants/alert-banner-height banners-count))
:width (:width (rn/get-window)) :width (int (:width (rn/get-window)))
:height constants/alert-banner-height :height constants/alert-banner-height
:borderRadius style/border-radius}]} :borderRadius style/border-radius}]}
[rn/view {:style {:background-color colors/neutral-100}} [rn/view {:style {:background-color colors/neutral-100}}