mirror of
https://github.com/status-im/status-mobile.git
synced 2025-01-14 18:54:52 +00:00
[#5024] Fix for landscale layout on Backup Seed screen
Signed-off-by: Igor Mandrigin <i@mandrigin.ru>
This commit is contained in:
parent
08a61b40cf
commit
3fd2aae932
@ -90,15 +90,23 @@
|
|||||||
(assoc :accessibility-label accessibility-label))
|
(assoc :accessibility-label accessibility-label))
|
||||||
(if more-than-9 (i18n/label :t/counter-9-plus) value)]])))
|
(if more-than-9 (i18n/label :t/counter-9-plus) value)]])))
|
||||||
|
|
||||||
(defn image-contain [_ _]
|
(defview image-contain [{:keys [container-style style]} {:keys [image width height]}]
|
||||||
(let [content-width (reagent/atom 0)]
|
(letsubs [content-width (reagent/atom 0)
|
||||||
(reagent/create-class
|
{window-width :width window-height :height} [:dimensions/window]]
|
||||||
{:reagent-render
|
|
||||||
(fn [{:keys [container-style style]} {:keys [image width height]}]
|
|
||||||
[react/view {:style (merge styles/image-contain container-style)
|
[react/view {:style (merge styles/image-contain container-style)
|
||||||
:on-layout #(reset! content-width (-> % .-nativeEvent .-layout .-width))}
|
:on-layout #(reset! content-width (-> % .-nativeEvent .-layout .-width))}
|
||||||
[react/image {:source image
|
[react/image {:source image
|
||||||
:resize-mode :contain
|
:resize-mode :contain
|
||||||
:style (merge style
|
:style (merge style
|
||||||
|
(if (> window-height window-width)
|
||||||
|
{:width (* @content-width
|
||||||
|
(if (< window-height 600)
|
||||||
|
0.6
|
||||||
|
1))
|
||||||
|
:height (/ (* @content-width height
|
||||||
|
(if (< window-height 600)
|
||||||
|
0.6
|
||||||
|
1))
|
||||||
|
width)}
|
||||||
{:width @content-width
|
{:width @content-width
|
||||||
:height (/ (* @content-width height) width)})}]])})))
|
:height (* window-height 0.6)}))}]]))
|
||||||
|
@ -8,7 +8,8 @@
|
|||||||
:margin-horizontal 26})
|
:margin-horizontal 26})
|
||||||
|
|
||||||
(def intro-image
|
(def intro-image
|
||||||
{:padding-bottom 10})
|
{:padding-bottom 10
|
||||||
|
:align-items :center})
|
||||||
|
|
||||||
(def intro-text
|
(def intro-text
|
||||||
{:text-align :center
|
{:text-align :center
|
||||||
|
Loading…
x
Reference in New Issue
Block a user