From 41761fd8a2bcc870fe9d14b43fefd822173611a0 Mon Sep 17 00:00:00 2001 From: Aleksandr Pantiukhov Date: Mon, 11 Jun 2018 12:55:11 +0200 Subject: [PATCH] [#4684]: Share data picture is cut on the top Signed-off-by: Pedro Pombeiro --- .../ui/screens/usage_data/styles.cljs | 27 ++++++++++--------- .../ui/screens/usage_data/views.cljs | 21 ++++++++------- 2 files changed, 25 insertions(+), 23 deletions(-) diff --git a/src/status_im/ui/screens/usage_data/styles.cljs b/src/status_im/ui/screens/usage_data/styles.cljs index ca845998f7..d98dd0f3b8 100644 --- a/src/status_im/ui/screens/usage_data/styles.cljs +++ b/src/status_im/ui/screens/usage_data/styles.cljs @@ -11,21 +11,20 @@ (def usage-data-view {:flex 1 - :margin-top (scaled-y 90) :background-color colors/white - :align-items :center}) + :align-items :center + :justify-content :center}) (def image-container - {:flex 1 - ;; on screens less tall than iPhone 5, let's not show the image at all - :display (if (>= window-height 568) "flex" "none") + {;; on screens less tall than iPhone 5, let's not show the image at all + :display (if (>= window-height 568) "flex" "none") :align-items :center :justify-content :center - :margin-bottom (scaled-y 90)}) + :margin-bottom (scaled-y 30)}) (def usage-data-image - {:width (* (/ 390 432) (scaled-y 138)) - :height (scaled-y 138)}) + {:width (* (/ 390 432) (scaled-y 138)) + :height (scaled-y 138)}) (defstyle help-improve-text {:text-align :center @@ -53,15 +52,17 @@ (def learn-what-we-collect-link {:text-align :center :color colors/blue - :margin-bottom (scaled-y 109) :margin-left 61 :margin-right 63}) (def bottom-button-container - {:flex-direction :row - :margin-bottom (scaled-y (if platform/ios? 96 48)) - :margin-left 41 - :margin-right 42}) + {:flex-direction :row + ;; we need to make a margin smaller on iPhone 5(s) + :margin-top (scaled-y (if (and platform/ios? + (> window-height 568)) + 96 48)) + :margin-left 41 + :margin-right 42}) (def share-button {:padding-horizontal 18 diff --git a/src/status_im/ui/screens/usage_data/views.cljs b/src/status_im/ui/screens/usage_data/views.cljs index 57b7efd5e4..90e8324225 100644 --- a/src/status_im/ui/screens/usage_data/views.cljs +++ b/src/status_im/ui/screens/usage_data/views.cljs @@ -13,17 +13,18 @@ (views/letsubs [next [:get-screen-params]] [react/view {:style styles/usage-data-view} [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/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 {: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/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 [components.common/button {:button-style styles/share-button :uppercase? false