From 8fa0522bada0e2923bc5883553423e206a30034b Mon Sep 17 00:00:00 2001 From: Shi Lei <38782954+wolfgangshilei@users.noreply.github.com> Date: Sun, 26 Aug 2018 00:35:15 +0800 Subject: [PATCH] [fix #5604] Fixed the problem of tooltips being cropped out on the android platform. Three screens: account/create, account/login and wallet/transaction-fee are known to be affected by this issue. In the former two screens, the fixes incur no visible UI changes; in the last screen, the tooltips are shifted down by 8 points. Signed-off-by: Dmitry Novotochinov --- src/status_im/ui/screens/accounts/create/styles.cljs | 7 +++++-- src/status_im/ui/screens/accounts/login/styles.cljs | 4 +++- src/status_im/ui/screens/wallet/send/styles.cljs | 4 ++++ .../ui/screens/wallet/transaction_fee/views.cljs | 10 ++++++---- 4 files changed, 18 insertions(+), 7 deletions(-) diff --git a/src/status_im/ui/screens/accounts/create/styles.cljs b/src/status_im/ui/screens/accounts/create/styles.cljs index bb157844fa..dbd1cb88ec 100644 --- a/src/status_im/ui/screens/accounts/create/styles.cljs +++ b/src/status_im/ui/screens/accounts/create/styles.cljs @@ -1,4 +1,5 @@ (ns status-im.ui.screens.accounts.create.styles + (:require-macros [status-im.utils.styles :refer [defstyle]]) (:require [status-im.ui.components.colors :as colors])) (def create-account-view @@ -42,9 +43,11 @@ {:size 82 :icon-size 34}) -(def input-container +(defstyle input-container {:margin-horizontal 16 - :margin-top 105}) + :margin-top 105 + :android {:padding-top 13 + :margin-top 92}}) (def input-description {:font-size 14 diff --git a/src/status_im/ui/screens/accounts/login/styles.cljs b/src/status_im/ui/screens/accounts/login/styles.cljs index 5eac6e995d..af1ee35a3a 100644 --- a/src/status_im/ui/screens/accounts/login/styles.cljs +++ b/src/status_im/ui/screens/accounts/login/styles.cljs @@ -37,7 +37,9 @@ :margin-top 8}) (def password-container - {:margin-top 24}) + {:margin-top 24 + :android {:margin-top 11 + :padding-top 13}}) (def save-password-checkbox-container {:margin-top 0 diff --git a/src/status_im/ui/screens/wallet/send/styles.cljs b/src/status_im/ui/screens/wallet/send/styles.cljs index a0cc04b473..b65959cb23 100644 --- a/src/status_im/ui/screens/wallet/send/styles.cljs +++ b/src/status_im/ui/screens/wallet/send/styles.cljs @@ -1,4 +1,5 @@ (ns status-im.ui.screens.wallet.send.styles + (:require-macros [status-im.utils.styles :refer [defstyle]]) (:require [status-im.ui.components.colors :as colors] [status-im.ui.components.styles :as styles] [status-im.ui.screens.wallet.components.styles :as wallet.components.styles])) @@ -148,3 +149,6 @@ (def password-error-tooltip {:bottom-value 15 :color colors/red-light}) + +(defstyle gas-input-error-tooltip + {:android {:bottom-value -38}}) diff --git a/src/status_im/ui/screens/wallet/transaction_fee/views.cljs b/src/status_im/ui/screens/wallet/transaction_fee/views.cljs index 0043c2ba3e..4d11563d52 100644 --- a/src/status_im/ui/screens/wallet/transaction_fee/views.cljs +++ b/src/status_im/ui/screens/wallet/transaction_fee/views.cljs @@ -52,7 +52,7 @@ :default-value gas :accessibility-label :gas-limit-input})]]] (when (:invalid? gas-edit) - [tooltip/tooltip (i18n/label :t/invalid-number)])] + [tooltip/tooltip (i18n/label :t/invalid-number) styles/gas-input-error-tooltip])] [react/view styles/gas-container-wrapper [components/cartouche {} @@ -65,9 +65,11 @@ [components/cartouche-secondary-text (i18n/label :t/gwei)]]] (when (:invalid? gas-price-edit) - [tooltip/tooltip (i18n/label (if (= :invalid-number (:invalid? gas-price-edit)) - :t/invalid-number - :t/wallet-send-min-wei))])]] + [tooltip/tooltip + (i18n/label (if (= :invalid-number (:invalid? gas-price-edit)) + :t/invalid-number + :t/wallet-send-min-wei)) + styles/gas-input-error-tooltip])]] [react/view styles/transaction-fee-info [react/view styles/transaction-fee-info-icon