From c4e4400ccbf02934c8902035727f7c334b1b5c0b Mon Sep 17 00:00:00 2001 From: alwx Date: Tue, 3 Jan 2017 13:51:54 +0300 Subject: [PATCH] Bigger area for cross on QR display screen (#610) --- src/status_im/accounts/styles.cljs | 16 +++++++++++++++- src/status_im/accounts/views/qr_code.cljs | 11 ++++------- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/src/status_im/accounts/styles.cljs b/src/status_im/accounts/styles.cljs index b3aec31f9d..e50cd0f9f9 100644 --- a/src/status_im/accounts/styles.cljs +++ b/src/status_im/accounts/styles.cljs @@ -55,6 +55,13 @@ {:margin-left 8 :margin-right 4})) +(defn qr-code-container [dimensions] + {:background-color "white" + :width (:width dimensions) + :align-items :center + :justify-content :center + :padding 40}) + (def photo-image {:width 36 :height 36 @@ -78,6 +85,13 @@ :alignItems :center :justifyContent :center}) +(def online-image-container + {:width 40 + :height 40 + :margin-right 4 + :align-items :center + :justify-content :center}) + (def bottom-actions-container {:position :absolute :left 0 @@ -167,4 +181,4 @@ :background-color "#7597e4"}) (def done-button-text - {:color color-white}) \ No newline at end of file + {:color color-white}) diff --git a/src/status_im/accounts/views/qr_code.cljs b/src/status_im/accounts/views/qr_code.cljs index a48b96ab7e..c6bd278733 100644 --- a/src/status_im/accounts/views/qr_code.cljs +++ b/src/status_im/accounts/views/qr_code.cljs @@ -32,19 +32,16 @@ :number-of-lines 1} name]] [view st/online-container [touchable-highlight {:onPress #(dispatch [:navigate-back])} - [image {:source {:uri :icon_close_white} - :style icon-close}]]]]] + [view st/online-image-container + [image {:source {:uri :icon_close_white} + :style icon-close}]]]]]] [view {:style st/qr-code :on-layout #(let [layout (.. % -nativeEvent -layout)] (dispatch [:set-in [:qr-modal :dimensions] {:width (.-width layout) :height (.-height layout)}]))} (when (:width dimensions) - [view {:style {:background-color "white" - :width (:width dimensions) - :align-items :center - :justify-content :center - :padding 40}} + [view {:style (st/qr-code-container dimensions)} [qr-code {:value (if amount? (prn-str {:address (get contact qr-source) :amount amount})