mirror of
https://github.com/penpot/penpot.git
synced 2025-02-08 08:09:14 -05:00
♻️ Use correct function for color transformation
Regression introduced in previous refactor PR
This commit is contained in:
parent
42acdbd135
commit
99d7b7ebf8
2 changed files with 1 additions and 12 deletions
|
@ -143,7 +143,6 @@
|
||||||
|
|
||||||
;; --- fill
|
;; --- fill
|
||||||
|
|
||||||
;; FIXME: revisit, this generates invalid colors
|
|
||||||
(defn fill->shape-color
|
(defn fill->shape-color
|
||||||
[fill]
|
[fill]
|
||||||
(d/without-nils
|
(d/without-nils
|
||||||
|
@ -154,16 +153,6 @@
|
||||||
:ref-id (:fill-color-ref-id fill)
|
:ref-id (:fill-color-ref-id fill)
|
||||||
:ref-file (:fill-color-ref-file fill)}))
|
:ref-file (:fill-color-ref-file fill)}))
|
||||||
|
|
||||||
(defn fill->color
|
|
||||||
[fill]
|
|
||||||
(d/without-nils
|
|
||||||
{:color (:fill-color fill)
|
|
||||||
:opacity (:fill-opacity fill)
|
|
||||||
:gradient (:fill-color-gradient fill)
|
|
||||||
:image (:fill-image fill)
|
|
||||||
:id (:fill-color-ref-id fill)
|
|
||||||
:file-id (:fill-color-ref-file fill)}))
|
|
||||||
|
|
||||||
(defn set-fill-color
|
(defn set-fill-color
|
||||||
[shape position color opacity gradient image]
|
[shape position color opacity gradient image]
|
||||||
(update-in shape [:fills position]
|
(update-in shape [:fills position]
|
||||||
|
|
|
@ -168,7 +168,7 @@
|
||||||
(seq fills)
|
(seq fills)
|
||||||
[:& h/sortable-container {}
|
[:& h/sortable-container {}
|
||||||
(for [[index value] (d/enumerate (:fills values []))]
|
(for [[index value] (d/enumerate (:fills values []))]
|
||||||
[:& color-row {:color (ctc/fill->color value)
|
[:& color-row {:color (ctc/fill->shape-color value)
|
||||||
:key index
|
:key index
|
||||||
:index index
|
:index index
|
||||||
:title (tr "workspace.options.fill")
|
:title (tr "workspace.options.fill")
|
||||||
|
|
Loading…
Add table
Reference in a new issue