From e0b759b4b51974d39f4da34ae8abbf71354e370b Mon Sep 17 00:00:00 2001 From: yqrashawn Date: Mon, 15 Apr 2024 16:49:23 +0800 Subject: [PATCH] fix: reaction selector style, pixel perfect Signed-off-by: yqrashawn --- .../selectors/reactions_selector/style.cljs | 33 ++++++++++++++----- .../chat/messenger/messages/drawers/view.cljs | 2 +- 2 files changed, 26 insertions(+), 9 deletions(-) diff --git a/src/quo/components/selectors/reactions_selector/style.cljs b/src/quo/components/selectors/reactions_selector/style.cljs index e53d83609281..439db7f9e780 100644 --- a/src/quo/components/selectors/reactions_selector/style.cljs +++ b/src/quo/components/selectors/reactions_selector/style.cljs @@ -1,14 +1,31 @@ (ns quo.components.selectors.reactions-selector.style (:require - [quo.foundations.colors :as colors])) + [quo.foundations.colors :as colors] + [react-native.platform :as platform])) (defn container [pressed? theme] - {:padding 9 - :border-radius 12 - :border-width 1 - :border-color (colors/theme-colors colors/neutral-20 colors/neutral-80 theme) - :background-color (when pressed? - (colors/theme-colors colors/neutral-10 colors/neutral-80-opa-40 theme))}) + (merge + {:border-radius 12 + :border-width 1 + :border-color (colors/theme-colors colors/neutral-20 colors/neutral-80 theme) + :background-color (when pressed? + (colors/theme-colors colors/neutral-10 colors/neutral-80-opa-40 theme))} + (if platform/ios? + {:padding 9.5 + :padding-horizontal 8} + {:padding 8}))) -(def emoji-text-style {:line-height 20}) +(def emoji-text-style + (merge + {:line-height 20 + :text-align :center} + (if platform/ios? + {:line-height 20 + :font-size 17 + :text-align :center} + {:font-size 18 + :height 24 + :width 24 + :text-align :center + :text-align-vertical :center}))) diff --git a/src/status_im/contexts/chat/messenger/messages/drawers/view.cljs b/src/status_im/contexts/chat/messenger/messages/drawers/view.cljs index 497ca55eae12..8d307980b567 100644 --- a/src/status_im/contexts/chat/messenger/messages/drawers/view.cljs +++ b/src/status_im/contexts/chat/messenger/messages/drawers/view.cljs @@ -186,7 +186,7 @@ [rn/view {:style {:flex-direction :row :justify-content :space-between - :padding-horizontal 30 + :padding-horizontal 22 :padding-top 5 :padding-bottom 15}} (for [[id reaction-name] constants/reactions