diff --git a/CHANGES.md b/CHANGES.md index ed14664e4..54cc0c325 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -17,6 +17,7 @@ ### :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 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). diff --git a/frontend/src/app/main/data/workspace/colors.cljs b/frontend/src/app/main/data/workspace/colors.cljs index 9188e6523..92ad45895 100644 --- a/frontend/src/app/main/data/workspace/colors.cljs +++ b/frontend/src/app/main/data/workspace/colors.cljs @@ -123,7 +123,11 @@ text-ids (filter 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) (assoc :fill-color (:color color)) @@ -138,7 +142,7 @@ (contains? color :opacity) (assoc :fill-opacity (:opacity color)))] - + (rx/concat (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))))))))) @@ -148,7 +152,11 @@ (ptk/reify ::change-stroke ptk/WatchEvent (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) (assoc :stroke-color (:color color)) diff --git a/frontend/src/app/main/ui/workspace/sidebar/assets.cljs b/frontend/src/app/main/ui/workspace/sidebar/assets.cljs index 8e701404e..3a4cc69a1 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/assets.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/assets.cljs @@ -797,7 +797,7 @@ apply-color (fn [_ event] (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-fill ids color)))))