[#4684]: Share data picture is cut on the top

Signed-off-by: Pedro Pombeiro <pombeirp@users.noreply.github.com>
This commit is contained in:
Aleksandr Pantiukhov 2018-06-11 12:55:11 +02:00 committed by Pedro Pombeiro
parent 3539020ee2
commit 41761fd8a2
No known key found for this signature in database
GPG Key ID: A65DEB11E4BBC647
2 changed files with 25 additions and 23 deletions

View File

@ -11,21 +11,20 @@
(def usage-data-view (def usage-data-view
{:flex 1 {:flex 1
:margin-top (scaled-y 90)
:background-color colors/white :background-color colors/white
:align-items :center}) :align-items :center
:justify-content :center})
(def image-container (def image-container
{:flex 1 {;; on screens less tall than iPhone 5, let's not show the image at all
;; on screens less tall than iPhone 5, let's not show the image at all :display (if (>= window-height 568) "flex" "none")
:display (if (>= window-height 568) "flex" "none")
:align-items :center :align-items :center
:justify-content :center :justify-content :center
:margin-bottom (scaled-y 90)}) :margin-bottom (scaled-y 30)})
(def usage-data-image (def usage-data-image
{:width (* (/ 390 432) (scaled-y 138)) {:width (* (/ 390 432) (scaled-y 138))
:height (scaled-y 138)}) :height (scaled-y 138)})
(defstyle help-improve-text (defstyle help-improve-text
{:text-align :center {:text-align :center
@ -53,15 +52,17 @@
(def learn-what-we-collect-link (def learn-what-we-collect-link
{:text-align :center {:text-align :center
:color colors/blue :color colors/blue
:margin-bottom (scaled-y 109)
:margin-left 61 :margin-left 61
:margin-right 63}) :margin-right 63})
(def bottom-button-container (def bottom-button-container
{:flex-direction :row {:flex-direction :row
:margin-bottom (scaled-y (if platform/ios? 96 48)) ;; we need to make a margin smaller on iPhone 5(s)
:margin-left 41 :margin-top (scaled-y (if (and platform/ios?
:margin-right 42}) (> window-height 568))
96 48))
:margin-left 41
:margin-right 42})
(def share-button (def share-button
{:padding-horizontal 18 {:padding-horizontal 18

View File

@ -13,17 +13,18 @@
(views/letsubs [next [:get-screen-params]] (views/letsubs [next [:get-screen-params]]
[react/view {:style styles/usage-data-view} [react/view {:style styles/usage-data-view}
[status-bar/status-bar {:flat? true}] [status-bar/status-bar {:flat? true}]
[react/view {:style styles/image-container}
[react/image {:source (:analytics-image resources/ui)
:style styles/usage-data-image}]]
[react/text {:style styles/help-improve-text}
(i18n/label :t/help-improve)]
[react/view [react/view
[react/text {:style styles/help-improve-text-description} [react/view {:style styles/image-container}
(i18n/label :t/help-improve-description)]] [react/image {:source (:analytics-image resources/ui)
[react/text {:style styles/learn-what-we-collect-link :style styles/usage-data-image}]]
:on-press #(.openURL react/linking "https://wiki.status.im/Help_Improve_Status#Help_Improve_Status")} [react/text {:style styles/help-improve-text}
(i18n/label :t/learn-what-we-collect-link)] (i18n/label :t/help-improve)]
[react/view
[react/text {:style styles/help-improve-text-description}
(i18n/label :t/help-improve-description)]]
[react/text {:style styles/learn-what-we-collect-link
:on-press #(.openURL react/linking "https://wiki.status.im/Help_Improve_Status#Help_Improve_Status")}
(i18n/label :t/learn-what-we-collect-link)]]
[react/view styles/bottom-button-container [react/view styles/bottom-button-container
[components.common/button {:button-style styles/share-button [components.common/button {:button-style styles/share-button
:uppercase? false :uppercase? false