diff --git a/CHANGES.md b/CHANGES.md index 46bbe67de6..4de8b1e04e 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -17,8 +17,9 @@ ### :bug: Bugs fixed -- Fix default project name in all languages [Taiga #2280](https://tree.taiga.io/project/penpot/issue/2280) -- Fix line-height and letter-spacing inputs to allow negative values [Taiga #2381](https://tree.taiga.io/project/penpot/issue/2381) +- 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 line-height and letter-spacing inputs to allow negative values [Taiga #2381](https://tree.taiga.io/project/penpot/issue/2381). - Fix typo in Handoff tooltip [Taiga #2428](https://tree.taiga.io/project/penpot/issue/2428). - Fix crash when pressing Shift+1 on empty file [#1435](https://github.com/penpot/penpot/issues/1435). - Fix masked group resize strange behavior [Taiga #2317](https://tree.taiga.io/project/penpot/issue/2317). diff --git a/frontend/src/app/main/ui/workspace/colorpalette.cljs b/frontend/src/app/main/ui/workspace/colorpalette.cljs index 7778fe5770..006fdaaa5c 100644 --- a/frontend/src/app/main/ui/workspace/colorpalette.cljs +++ b/frontend/src/app/main/ui/workspace/colorpalette.cljs @@ -8,7 +8,6 @@ (:require [app.common.math :as mth] [app.main.data.workspace.colors :as mdc] - [app.main.data.workspace.state-helpers :as wsh] [app.main.refs :as refs] [app.main.store :as st] [app.main.ui.components.color-bullet :as cb] @@ -40,12 +39,12 @@ ;; --- Components (mf/defc palette-item [{:keys [color size]}] - (let [select-color + (let [ids-with-children (map :id (mf/deref refs/selected-shapes-with-children)) + select-color (fn [event] - (let [ids (wsh/lookup-selected @st/state)] - (if (kbd/alt? event) - (st/emit! (mdc/change-stroke ids (merge uc/empty-color color))) - (st/emit! (mdc/change-fill ids (merge uc/empty-color color))))))] + (if (kbd/alt? event) + (st/emit! (mdc/change-stroke ids-with-children (merge uc/empty-color color))) + (st/emit! (mdc/change-fill ids-with-children (merge uc/empty-color color)))))] [:div.color-cell {:class (str "cell-"(name size)) :on-click select-color}