bigger tap area for buttons

This commit is contained in:
Gustavo Nunes 2017-04-26 01:46:00 -03:00 committed by Roman Volosovskyi
parent a8566759b5
commit faa146a35d
8 changed files with 42 additions and 31 deletions

View File

@ -46,19 +46,18 @@
:ios {:margin-top 14}}) :ios {:margin-top 14}})
(defstyle chat-options-container (defstyle chat-options-container
{:margin-right 16 {:padding-top 10})
:padding-top 10
:android {:margin-top 16}
:ios {:margin-top 14}})
(def item-upper-container (defstyle item-upper-container
{:flex 1 {:flex 1
:flex-direction :row}) :flex-direction :row
:padding-right 16})
(defstyle item-lower-container (defstyle item-lower-container
{:flex 1 {:flex 1
:flex-direction :row :flex-direction :row
:justify-content :space-between :justify-content :space-between
:padding-right 16
:android {:margin-top 4} :android {:margin-top 4}
:ios {:margin-top 6}}) :ios {:margin-top 6}})
@ -152,12 +151,13 @@
{:flex-direction :row {:flex-direction :row
:padding-right 14}) :padding-right 14})
(def opts-btn (def opts-btn-container
{:width 24 {:align-items :center
:height 24
:align-items :center
:justify-content :center}) :justify-content :center})
(def opts-btn
{:padding 16})
(def create-icon (def create-icon
{:fontSize 20 {:fontSize 20
:height 22 :height 22

View File

@ -90,10 +90,12 @@
(let [options [{:value #(dispatch [:remove-chat chat-id]) (let [options [{:value #(dispatch [:remove-chat chat-id])
:text (label :t/delete-chat) :text (label :t/delete-chat)
:destructive? true}]] :destructive? true}]]
[view st/opts-btn [view st/opts-btn-container
[context-menu [context-menu
[icon :options_gray] [icon :options_gray]
options]])) options
nil
st/opts-btn]]))
(defn chat-list-item-name [name group-chat? public?] (defn chat-list-item-name [name group-chat? public?]
(let [private-group? (and group-chat? (not public?)) (let [private-group? (and group-chat? (not public?))

View File

@ -53,5 +53,7 @@
[view st/form-title-extend-container [view st/form-title-extend-container
[context-menu [context-menu
[icon :options_gray] [icon :options_gray]
options]])] options
nil
st/form-title-extend-button]])]
[top-shadow]]) [top-shadow]])

View File

@ -55,13 +55,14 @@
:margin-top 8}}) :margin-top 8}})
(defstyle form-title-extend-container (defstyle form-title-extend-container
{:padding-right 16 {:ios {:margin-top 16
:ios {:margin-top 16
:padding-top 16
:background-color color-white} :background-color color-white}
:android {:margin-top 24 :android {:margin-top 8
:background-color color-light-gray}}) :background-color color-light-gray}})
(def form-title-extend-button
{:padding 16})
(defstyle form-title (defstyle form-title
{:flex-shrink 1 {:flex-shrink 1
:ios {:color text1-color :ios {:color text1-color

View File

@ -33,10 +33,12 @@
[view st/contact-container [view st/contact-container
[contact-inner-view {:contact contact :info info}] [contact-inner-view {:contact contact :info info}]
(when extended? (when extended?
[view st/more-btn [view st/more-btn-container
[context-menu [context-menu
[icon :options_gray] [icon :options_gray]
extend-options]])]]]) extend-options
nil
st/more-btn]])]]])
(defview toogle-contact-view [{:keys [whisper-identity] :as contact} selected-key on-toggle-handler] (defview toogle-contact-view [{:keys [whisper-identity] :as contact} selected-key on-toggle-handler]
[checked [selected-key whisper-identity]] [checked [selected-key whisper-identity]]

View File

@ -33,14 +33,14 @@
(def contact-container (def contact-container
{:flex-direction :row {:flex-direction :row
:align-items :center :align-items :center
:background-color common/color-white :background-color common/color-white})
:padding-right 16})
(def more-btn-container
{:alignItems :center
:justifyContent :center})
(def more-btn (def more-btn
{:width 24 {:padding 16})
:height 24
:alignItems :center
:justifyContent :center})
(def selected-contact (def selected-contact
{:background-color common/selected-contact-color}) {:background-color common/selected-contact-color})

View File

@ -98,7 +98,9 @@
(when options (when options
[context-menu [context-menu
[icon :options_gray] [icon :options_gray]
options])]) options
nil
st/profile-info-item-button])])
(defn show-qr [contact qr-source] (defn show-qr [contact qr-source]
#(dispatch [:navigate-to-modal :qr-code-view {:contact contact #(dispatch [:navigate-to-modal :qr-code-view {:contact contact

View File

@ -26,6 +26,9 @@
(defstyle profile-info-container (defstyle profile-info-container
{:background-color color-white}) {:background-color color-white})
(def profile-info-item-button
{:padding 16})
(def status-prompt (def status-prompt
{:padding-left 16 {:padding-left 16
:padding-right 16 :padding-right 16
@ -95,7 +98,6 @@
{:flex-direction :row {:flex-direction :row
:align-items :center :align-items :center
:padding-left 16 :padding-left 16
:padding-right 16
:ios {:height 73} :ios {:height 73}
:android {:height 72}}) :android {:height 72}})