Skip to content

Commit 848cac3

Browse files
[#17300] fix: syncing device indicator color and some alignment (#17340)
1 parent 7e646f7 commit 848cac3

File tree

4 files changed

+22
-20
lines changed

4 files changed

+22
-20
lines changed

src/quo2/components/settings/settings_item/style.cljs

+18-17
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,31 @@
11
(ns quo2.components.settings.settings-item.style
22
(:require [quo2.foundations.colors :as colors]))
33

4-
(defn find-icon-height
5-
[description tag image]
6-
(let [icon-height (if (= image :icon-avatar) 32 20)
7-
icon-height (if description 40 icon-height)]
8-
(if tag 72 icon-height)))
9-
104
(defn container
11-
[{:keys [in-card? tag container-style]}]
12-
(merge {:padding-horizontal 12
13-
:padding-top (if in-card? 12 13)
14-
:padding-bottom (if in-card? 12 13)
15-
:flex-direction :row
16-
:justify-content :space-between
17-
:height (if tag 96 48)}
5+
[{:keys [container-style]}]
6+
(merge {:padding 12
7+
:flex-direction :row
8+
:justify-content :space-between}
189
container-style))
1910

11+
(defn left-sub-container
12+
[{:keys [tag description]}]
13+
{:flex-direction :row
14+
:align-items (if (or tag description) :flex-start :center)})
15+
2016
(def sub-container
2117
{:flex-direction :row
2218
:align-items :center})
2319

2420
(def left-container
2521
{:margin-left 12
2622
:height "100%"
27-
:justify-content :center})
23+
:justify-content :flex-start})
2824

2925
(defn image-container
30-
[description tag image]
31-
{:height (find-icon-height description tag image)
32-
:justify-content :flex-start})
26+
[image tag description]
27+
{:height (if (= image :icon-avatar) 32 20)
28+
:margin-top (if (or tag description) 1 0)})
3329

3430
(def status-container
3531
{:flex-direction :row
@@ -57,3 +53,8 @@
5753
:height 15
5854
:border-radius 12
5955
:background-color background-color})
56+
57+
(def status-tag-container
58+
{:margin-top 7
59+
:margin-bottom 2
60+
:margin-left -1})

src/quo2/components/settings/settings_item/view.cljs

+2-2
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
:label (:label tag-props)
6666
:no-icon? true
6767
:size :small
68-
:container-style {:margin-top 8}}]
68+
:container-style style/status-tag-container}]
6969
:context [context-tag/view
7070
(merge tag-props
7171
{:type :icon
@@ -105,7 +105,7 @@
105105
{:style (style/container props)
106106
:on-press on-press
107107
:accessibility-label accessibility-label}
108-
[rn/view {:style style/sub-container}
108+
[rn/view {:style (style/left-sub-container props)}
109109
[image-component props]
110110
[rn/view {:style style/left-container}
111111
[text/text {:weight :medium} title]

src/status_im2/contexts/syncing/device/style.cljs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
{:border-color colors/white-opa-5
66
:border-radius 16
77
:border-width 1
8-
:margin-top 12})
8+
:margin-top 11})

src/status_im2/contexts/syncing/device/view.cljs

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
(cond->
1717
{:container-style style/device-container
1818
:title name
19+
:blur? true
1920
:image :icon
2021
:image-props (cond (#{:mobile :ios :android} (keyword device-type))
2122
:i/mobile

0 commit comments

Comments
 (0)