fix - Button colors have become darker (#18776)

This commit is contained in:
Ajay Sivan 2024-02-12 18:36:18 +05:30 committed by GitHub
parent da192dcdb3
commit 1351a54fd1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 4 deletions

View File

@ -4,11 +4,15 @@
(def backgrounds #{:photo :blur}) (def backgrounds #{:photo :blur})
;; Note: We hardcode the :light theme for the background-color and apply an overlay when necessary, such
;; as for dark themes and pressed states. This approach is taken because, for communities, we only have
;; one color available, which is the light theme version.
;; For more information, see the related issue: https://github.com/status-im/status-mobile/issues/16396
(defn- custom-color-type (defn- custom-color-type
[customization-color icon-only? theme] [customization-color icon-only?]
{:icon-color colors/white-opa-70 {:icon-color colors/white-opa-70
:label-color colors/white :label-color colors/white
:background-color (colors/resolve-color customization-color theme) :background-color (colors/resolve-color customization-color :light)
:border-radius (when icon-only? 24) :border-radius (when icon-only? 24)
:overlay-customization-color customization-color}) :overlay-customization-color customization-color})
@ -87,8 +91,7 @@
type)] type)]
(cond (cond
(contains? #{:primary :positive :danger} type) (custom-color-type customization-color (contains? #{:primary :positive :danger} type) (custom-color-type customization-color
icon-only? icon-only?)
theme)
(and (= :photo background) (= type :grey)) (grey-photo theme pressed?) (and (= :photo background) (= type :grey)) (grey-photo theme pressed?)
(and (= :blur background) (= type :grey)) (grey-blur theme pressed?) (and (= :blur background) (= type :grey)) (grey-blur theme pressed?)
(and (= :blur background) (= type :outline)) (outline-blur theme pressed?) (and (= :blur background) (= type :outline)) (outline-blur theme pressed?)