mirror of
https://github.com/penpot/penpot.git
synced 2025-01-10 08:50:57 -05:00
🐛 Remove gradient if any when applyin solid color from library
This commit is contained in:
parent
16c4116c15
commit
1ded4b2b28
3 changed files with 13 additions and 4 deletions
|
@ -17,6 +17,7 @@
|
||||||
|
|
||||||
### :bug: Bugs fixed
|
### :bug: Bugs fixed
|
||||||
|
|
||||||
|
- Fix remove gradient if any when applying color from library [Taiga #2299](https://tree.taiga.io/project/penpot/issue/2299).
|
||||||
- Fix Enter as key action to exit edit path [Taiga #2444](https://tree.taiga.io/project/penpot/issue/2444).
|
- Fix Enter as key action to exit edit path [Taiga #2444](https://tree.taiga.io/project/penpot/issue/2444).
|
||||||
- Fix add fill color from palette to groups and components [Taiga #2313](https://tree.taiga.io/project/penpot/issue/2313).
|
- Fix add fill color from palette to groups and components [Taiga #2313](https://tree.taiga.io/project/penpot/issue/2313).
|
||||||
- Fix default project name in all languages [Taiga #2280](https://tree.taiga.io/project/penpot/issue/2280).
|
- Fix default project name in all languages [Taiga #2280](https://tree.taiga.io/project/penpot/issue/2280).
|
||||||
|
|
|
@ -123,7 +123,11 @@
|
||||||
text-ids (filter is-text? ids)
|
text-ids (filter is-text? ids)
|
||||||
shape-ids (filter (comp not is-text?) ids)
|
shape-ids (filter (comp not is-text?) ids)
|
||||||
|
|
||||||
attrs (cond-> {}
|
attrs (cond-> {:fill-color nil
|
||||||
|
:fill-color-gradient nil
|
||||||
|
::fill-color-ref-file nil
|
||||||
|
:fill-color-ref-id nil
|
||||||
|
:fill-opacity nil}
|
||||||
(contains? color :color)
|
(contains? color :color)
|
||||||
(assoc :fill-color (:color color))
|
(assoc :fill-color (:color color))
|
||||||
|
|
||||||
|
@ -138,7 +142,7 @@
|
||||||
|
|
||||||
(contains? color :opacity)
|
(contains? color :opacity)
|
||||||
(assoc :fill-opacity (:opacity color)))]
|
(assoc :fill-opacity (:opacity color)))]
|
||||||
|
|
||||||
(rx/concat
|
(rx/concat
|
||||||
(rx/from (map #(dwt/update-text-attrs {:id % :attrs attrs}) text-ids))
|
(rx/from (map #(dwt/update-text-attrs {:id % :attrs attrs}) text-ids))
|
||||||
(rx/of (dch/update-shapes shape-ids (fn [shape] (d/merge shape attrs)))))))))
|
(rx/of (dch/update-shapes shape-ids (fn [shape] (d/merge shape attrs)))))))))
|
||||||
|
@ -148,7 +152,11 @@
|
||||||
(ptk/reify ::change-stroke
|
(ptk/reify ::change-stroke
|
||||||
ptk/WatchEvent
|
ptk/WatchEvent
|
||||||
(watch [_ _ _]
|
(watch [_ _ _]
|
||||||
(let [attrs (cond-> {}
|
(let [attrs (cond-> {:stroke-color nil
|
||||||
|
:stroke-color-ref-id nil
|
||||||
|
:stroke-color-ref-file nil
|
||||||
|
:stroke-color-gradient nil
|
||||||
|
:stroke-opacity nil}
|
||||||
(contains? color :color)
|
(contains? color :color)
|
||||||
(assoc :stroke-color (:color color))
|
(assoc :stroke-color (:color color))
|
||||||
|
|
||||||
|
|
|
@ -797,7 +797,7 @@
|
||||||
apply-color
|
apply-color
|
||||||
(fn [_ event]
|
(fn [_ event]
|
||||||
(let [ids (wsh/lookup-selected @st/state)]
|
(let [ids (wsh/lookup-selected @st/state)]
|
||||||
(if (kbd/shift? event)
|
(if (kbd/alt? event)
|
||||||
(st/emit! (dc/change-stroke ids color))
|
(st/emit! (dc/change-stroke ids color))
|
||||||
(st/emit! (dc/change-fill ids color)))))
|
(st/emit! (dc/change-fill ids color)))))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue