fix: floating-shell-button (#16030)
This commit is contained in:
parent
65eb0af191
commit
15211865fb
|
@ -68,7 +68,8 @@
|
||||||
:on-press-out #(reset! pressed? false)
|
:on-press-out #(reset! pressed? false)
|
||||||
:on-press on-press
|
:on-press on-press
|
||||||
:active-opacity 1
|
:active-opacity 1
|
||||||
:style {:padding 5}
|
:hit-slop {:top 5 :bottom 5 :left 5 :right 5}
|
||||||
|
:pointer-events :auto
|
||||||
:accessibility-label type}
|
:accessibility-label type}
|
||||||
[rn/view
|
[rn/view
|
||||||
{:style (merge
|
{:style (merge
|
||||||
|
|
|
@ -14,6 +14,10 @@
|
||||||
:style style
|
:style style
|
||||||
:customization-color customization-color}]))
|
:customization-color customization-color}]))
|
||||||
|
|
||||||
|
(defn- section
|
||||||
|
[children]
|
||||||
|
[rn/view {:style {:flex 1} :pointer-events :box-none} children])
|
||||||
|
|
||||||
(defn- f-floating-shell-button
|
(defn- f-floating-shell-button
|
||||||
[dynamic-buttons style opacity-anim]
|
[dynamic-buttons style opacity-anim]
|
||||||
(let [original-style (merge {:flex-direction :row
|
(let [original-style (merge {:flex-direction :row
|
||||||
|
@ -27,14 +31,14 @@
|
||||||
original-style)]
|
original-style)]
|
||||||
[reanimated/view {:style animated-style}
|
[reanimated/view {:style animated-style}
|
||||||
;; Left Section
|
;; Left Section
|
||||||
[rn/view {:style {:flex 1}}
|
[section
|
||||||
[dynamic-button-view :search dynamic-buttons
|
[dynamic-button-view :search dynamic-buttons
|
||||||
{:position :absolute
|
{:position :absolute
|
||||||
:right 8}]]
|
:right 8}]]
|
||||||
;; Mid Section (jump-to)
|
;; Mid Section (jump-to)
|
||||||
[dynamic-button-view :jump-to dynamic-buttons nil]
|
[dynamic-button-view :jump-to dynamic-buttons nil]
|
||||||
;; Right Section
|
;; Right Section
|
||||||
[rn/view {:style {:flex 1}}
|
[section
|
||||||
[rn/view
|
[rn/view
|
||||||
{:style {:position :absolute
|
{:style {:position :absolute
|
||||||
:flex-direction :row
|
:flex-direction :row
|
||||||
|
|
|
@ -114,7 +114,7 @@
|
||||||
|
|
||||||
(defn calc-shell-neg-y
|
(defn calc-shell-neg-y
|
||||||
[insets maximized? extra-height]
|
[insets maximized? extra-height]
|
||||||
(let [padding 6
|
(let [padding 12
|
||||||
neg-y (if @maximized? -50 0)]
|
neg-y (if @maximized? -50 0)]
|
||||||
(- (+ constants/bar-container-height
|
(- (+ constants/bar-container-height
|
||||||
constants/actions-container-height
|
constants/actions-container-height
|
||||||
|
|
|
@ -129,8 +129,7 @@
|
||||||
:label (i18n/label :t/jump-to)
|
:label (i18n/label :t/jump-to)
|
||||||
:customization-color customization-color}}
|
:customization-color customization-color}}
|
||||||
{:position :absolute
|
{:position :absolute
|
||||||
:bottom (+ (shell.constants/bottom-tabs-container-height) 7)} ;; bottom offset is 12 = 7 +
|
:bottom (+ (shell.constants/bottom-tabs-container-height) 12)}
|
||||||
;; 5(padding on button)
|
|
||||||
(:home-stack-opacity shared-values)]]))
|
(:home-stack-opacity shared-values)]]))
|
||||||
|
|
||||||
(defn shell-stack
|
(defn shell-stack
|
||||||
|
|
Loading…
Reference in New Issue