fix: floating-shell-button (#16030)

This commit is contained in:
Ajay Sivan 2023-05-29 09:40:21 -07:00 committed by GitHub
parent 65eb0af191
commit 15211865fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 6 deletions

View File

@ -68,7 +68,8 @@
:on-press-out #(reset! pressed? false)
:on-press on-press
:active-opacity 1
:style {:padding 5}
:hit-slop {:top 5 :bottom 5 :left 5 :right 5}
:pointer-events :auto
:accessibility-label type}
[rn/view
{:style (merge

View File

@ -14,6 +14,10 @@
:style style
:customization-color customization-color}]))
(defn- section
[children]
[rn/view {:style {:flex 1} :pointer-events :box-none} children])
(defn- f-floating-shell-button
[dynamic-buttons style opacity-anim]
(let [original-style (merge {:flex-direction :row
@ -27,14 +31,14 @@
original-style)]
[reanimated/view {:style animated-style}
;; Left Section
[rn/view {:style {:flex 1}}
[section
[dynamic-button-view :search dynamic-buttons
{:position :absolute
:right 8}]]
;; Mid Section (jump-to)
[dynamic-button-view :jump-to dynamic-buttons nil]
;; Right Section
[rn/view {:style {:flex 1}}
[section
[rn/view
{:style {:position :absolute
:flex-direction :row

View File

@ -114,7 +114,7 @@
(defn calc-shell-neg-y
[insets maximized? extra-height]
(let [padding 6
(let [padding 12
neg-y (if @maximized? -50 0)]
(- (+ constants/bar-container-height
constants/actions-container-height

View File

@ -129,8 +129,7 @@
:label (i18n/label :t/jump-to)
:customization-color customization-color}}
{:position :absolute
:bottom (+ (shell.constants/bottom-tabs-container-height) 7)} ;; bottom offset is 12 = 7 +
;; 5(padding on button)
:bottom (+ (shell.constants/bottom-tabs-container-height) 12)}
(:home-stack-opacity shared-values)]]))
(defn shell-stack