[fix 4417] update toolbar style

This commit is contained in:
Eric Dvorsak 2018-06-14 02:54:02 +02:00 committed by Roman Volosovskyi
parent 71867a9674
commit 8848b37433
No known key found for this signature in database
GPG Key ID: 0238A4B5ECEE70DE
8 changed files with 48 additions and 37 deletions

View File

@ -1,12 +1,13 @@
(ns status-im.android.platform)
(def fonts
{:light {:font-family "Roboto-Light"}
:default {:font-family "Roboto-Regular"}
:medium {:font-family "Roboto-Medium"}
{:light {:font-family "Roboto-Light"}
:default {:font-family "Roboto-Regular"}
:medium {:font-family "Roboto-Medium"}
:toolbar-title {:font-family "Roboto-Regular"}
:roboto-mono {:font-family "RobotoMono-Medium"}})
:toolbar-title {:font-family "Roboto-Medium"}
:toolbar-subtitle {:font-family "Roboto-Regular"}
:roboto-mono {:font-family "RobotoMono-Medium"}})
;; Structure to be exported

View File

@ -54,8 +54,9 @@
:margin-bottom 2})
(def chat-name-text
{:color component.styles/color-gray6
:font-size 16})
{:color component.styles/color-black
:line-height 18
:font-size 15})
(def group-icon
{:margin-top 4
@ -68,16 +69,17 @@
:height 8})
(defstyle toolbar-subtitle
{:color component.styles/text4-color
:ios {:font-size 14
:margin-top 4}
:android {:font-size 13}})
{:color component.styles/text4-color
:line-height 15
:font-size 13
:ios {:margin-top 4}})
(defstyle last-activity-text
{:color component.styles/text4-color
:ios {:font-size 14
:margin-top 4}
:android {:font-size 13}})
{:color component.styles/text4-color
:line-height 15
:ios {:font-size 14
:margin-top 4}
:android {:font-size 13}})
(defn actions-wrapper [status-bar-height]
{:background-color component.styles/color-white

View File

@ -41,6 +41,7 @@
(defview last-activity [{:keys [sync-state accessibility-label]}]
(letsubs [state [:get :sync-data]]
[react/text {:style st/last-activity-text
:font :toolbar-subtitle
:accessibility-label accessibility-label}
(case sync-state
:in-progress (in-progress-text state)
@ -52,10 +53,12 @@
[last-activity {:sync-state sync-state}]
(if public?
[react/view {:flex-direction :row}
[react/text {:style st/toolbar-subtitle}
[react/text {:style st/toolbar-subtitle
:font :toolbar-subtitle}
(i18n/label :t/public-group-status)]]
[react/view {:flex-direction :row}
[react/text {:style st/toolbar-subtitle}
[react/text {:style st/toolbar-subtitle
:font :toolbar-subtitle}
(if public?
(i18n/label :t/public-group-status)
(let [cnt (inc (count contacts))]

View File

@ -2,13 +2,14 @@
(:require [status-im.react-native.js-dependencies :as rn-dependencies]))
(def fonts
{:light {:font-family "SFUIText-Light"}
:default {:font-family "SFUIText-Regular"}
:medium {:font-family "SFUIText-Medium"}
:bold {:font-family "SFUIText-Bold"}
{:light {:font-family "SFUIText-Light"}
:default {:font-family "SFUIText-Regular"}
:medium {:font-family "SFUIText-Medium"}
:bold {:font-family "SFUIText-Bold"}
:toolbar-title {:font-family "SFUIText-Semibold"}
:roboto-mono {:font-family "RobotoMono-Medium"}})
:toolbar-title {:font-family "SFUIText-Semibold"}
:toolbar-subtitle {:font-family "SFUIText-Regular"}
:roboto-mono {:font-family "RobotoMono-Medium"}})
;; iPhone X dimensions
(def x-width 375)

View File

@ -246,7 +246,7 @@
:empty-chat-description "There are no messages \nin this chat yet"
:empty-chat-description-console "Look under the hood! Console is a javascript runtime environment that exposes the whole web3 API. Type \"web3.\" to get started."
:empty-chat-description-one-to-one "Any messages you send here are encrypted and can only be read by you and "
:counter-99-plus "99+"
:counter-9-plus "9+"
:show-more "Show more"
:show-less "Show less"

View File

@ -82,11 +82,13 @@
(defn counter
([value] (counter nil value))
([{:keys [size accessibility-label] :or {size 18}} value]
[react/view {:style (styles/counter-container size)}
[react/text (cond-> {:style (styles/counter-label size)}
accessibility-label
(assoc :accessibility-label accessibility-label))
(if (<= value 99) value (i18n/label :t/counter-99-plus))]]))
(let [more-than-9 (> value 9)]
[react/view {:style (styles/counter-container size more-than-9)}
[react/text (cond-> {:style (styles/counter-label size)
:font :toolbar-title}
accessibility-label
(assoc :accessibility-label accessibility-label))
(if more-than-9 (i18n/label :t/counter-9-plus) value)]])))
(defn image-contain [_ _]
(let [content-width (reagent/atom 0)]

View File

@ -149,19 +149,19 @@
:text-align :center
:color colors/blue})
(defn counter-container [size]
{:width size
(defn counter-container [size more-than-nine]
{:width (if more-than-nine (+ 2 size) size)
:height size
:border-radius (/ size 2)
:background-color colors/blue
:align-items :center
:justify-content :center})
(defn counter-label [size]
{:font-size (/ size 2)
:letter-spacing -0.2
:text-align :center
:color colors/white})
(defnstyle counter-label [size]
{:font-size (/ size 2)
:color colors/white
:android {:line-height (+ (/ size 2) 2)}
:text-align :center})
(def image-contain
{:align-self :stretch})

View File

@ -26,7 +26,9 @@
(defn nav-button
[{:keys [icon icon-opts unread-messages?] :as props}]
[nav-item (merge {:style (styles/nav-item-button unread-messages?)} props)
[vector-icons/icon icon icon-opts]])
[vector-icons/icon icon (if unread-messages?
(assoc icon-opts :color :active)
icon-opts)]])
(defview nav-button-with-count [props]
(letsubs [unread-messages-number [:get-chats-unread-messages-number]]