Skip to content

Commit a45f353

Browse files
authored
fix ios blur blue overlay (#17015)
1 parent e4a2ac9 commit a45f353

File tree

6 files changed

+27
-19
lines changed

6 files changed

+27
-19
lines changed

src/quo2/foundations/colors.cljs

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
(ns quo2.foundations.colors
22
(:require [clojure.string :as string]
3+
[react-native.platform :as platform]
34
[quo2.theme :as theme]))
45

56
(defn alpha
@@ -126,12 +127,13 @@
126127
(def neutral-5-opa-70-blur (alpha neutral-5 0.7))
127128
(def neutral-10-opa-10-blur (alpha neutral-10 0.1))
128129
(def neutral-10-opa-40-blur (alpha neutral-10 0.4))
129-
(def neutral-80-opa-80-blur (alpha "#192438" 0.8))
130+
;; https://github.com/status-im/status-mobile/issues/14903
131+
(def neutral-80-opa-80-blur (if platform/android? (alpha "#192438" 0.8) "#1E2430CC"))
130132
(def neutral-90-opa-10-blur (alpha neutral-90 0.1))
131133
(def neutral-90-opa-40-blur (alpha neutral-90 0.4))
132134
(def neutral-90-opa-70-blur (alpha neutral-90 0.7))
133135
(def neutral-95-opa-70-blur neutral-95-opa-70)
134-
(def neutral-100-opa-70-blur neutral-100-opa-70)
136+
(def neutral-100-opa-70-blur (if platform/android? neutral-100-opa-70 "#0D1014B3"))
135137

136138
;;;;Black
137139

src/status_im2/contexts/onboarding/common/background/view.cljs

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
[utils.i18n :as i18n]
55
[utils.re-frame :as rf]
66
[oops.core :refer [oget]]
7+
[react-native.platform :as platform]
78
[status-im2.common.resources :as resources]
89
[status-im.async-storage.core :as async-storage]
910
[status-im2.contexts.shell.jump-to.state :as shell.state]
@@ -88,10 +89,9 @@
8889
(when dark-overlay?
8990
[blur/view
9091
{:style style/background-blur-overlay
91-
:blur-amount 30
92-
:blur-radius 25
92+
:blur-amount (if platform/android? 30 20)
93+
:blur-radius (if platform/android? 25 10)
9394
:blur-type :transparent
9495
:overlay-color :transparent}])]))
9596

9697
(defn view [dark-overlay?] [:f> f-view dark-overlay?])
97-

src/status_im2/contexts/onboarding/common/overlay/view.cljs

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
[react-native.blur :as blur]
44
[react-native.core :as rn]
55
[reagent.core :as reagent]
6+
[react-native.platform :as platform]
67
[status-im2.contexts.onboarding.common.overlay.style :as style]
78
[status-im2.constants :as constants]))
89

@@ -61,7 +62,7 @@
6162
:style (style/blur-container opacity)}
6263
[blur/view
6364
{:blur-amount @blur-amount
64-
:blur-radius 25
65+
:blur-radius (if platform/android? 25 10)
6566
:blur-type :transparent
6667
:overlay-color :transparent
6768
:style style/blur-style}]]))

src/status_im2/contexts/shell/jump_to/components/bottom_tabs/style.cljs

+10-7
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,13 @@
2727
:flex 1
2828
:accessibility-label :bottom-tabs})
2929

30-
(def bottom-tabs-blur-overlay
31-
{:position :absolute
32-
:left 0
33-
:right 0
34-
:bottom 0
35-
:height (utils/bottom-tabs-extended-container-height)
36-
:background-color colors/neutral-100-opa-70})
30+
(defn bottom-tabs-blur-overlay
31+
[height]
32+
(reanimated/apply-animations-to-style
33+
{:height height}
34+
{:position :absolute
35+
:left 0
36+
:right 0
37+
:bottom 0
38+
:height (utils/bottom-tabs-container-height)
39+
:background-color colors/neutral-100-opa-70-blur}))

src/status_im2/contexts/shell/jump_to/components/bottom_tabs/view.cljs

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
(ns status-im2.contexts.shell.jump-to.components.bottom-tabs.view
22
(:require [utils.re-frame :as rf]
33
[react-native.core :as rn]
4-
[react-native.blur :as blur]
54
[react-native.gesture :as gesture]
5+
[react-native.platform :as platform]
66
[react-native.reanimated :as reanimated]
77
[status-im2.contexts.shell.jump-to.utils :as utils]
88
[status-im2.contexts.shell.jump-to.state :as state]
@@ -14,8 +14,8 @@
1414
(defn blur-overlay-params
1515
[style]
1616
{:style style
17-
:blur-amount 30
18-
:blur-radius 25
17+
:blur-amount (if platform/android? 30 20)
18+
:blur-radius (if platform/android? 25 10)
1919
:blur-type :transparent
2020
:overlay-color :transparent})
2121

@@ -53,13 +53,15 @@
5353
(gesture/number-of-taps 2)
5454
(gesture/on-start
5555
(fn [_event]
56-
(rf/dispatch [:messages-home/select-tab :tab/recent]))))]
56+
(rf/dispatch [:messages-home/select-tab :tab/recent]))))
57+
bottom-tabs-blur-overlay-style (style/bottom-tabs-blur-overlay (:bottom-tabs-height
58+
shared-values))]
5759
(utils/load-stack @state/selected-stack-id)
5860
(reanimated/set-shared-value (:pass-through? shared-values) pass-through?)
5961
[reanimated/view
6062
{:style (style/bottom-tabs-container pass-through? (:bottom-tabs-height shared-values))}
6163
(when pass-through?
62-
[blur/view (blur-overlay-params style/bottom-tabs-blur-overlay)])
64+
[reanimated/blur-view (blur-overlay-params bottom-tabs-blur-overlay-style)])
6365
[rn/view {:style (style/bottom-tabs)}
6466
[gesture/gesture-detector {:gesture communities-double-tab-gesture}
6567
[bottom-tab :i/communities :communities-stack shared-values notifications-data]]

src/status_im2/contexts/shell/jump_to/components/jump_to_screen/style.cljs

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,4 @@
6161
:left 0
6262
:right 0
6363
:top 0
64-
:background-color colors/neutral-100-opa-70})
64+
:background-color colors/neutral-100-opa-70-blur})

0 commit comments

Comments
 (0)