Merge pull request #6706 from penpot/niwinz-staging-opacity-fix

🐛 Fix incorrect handling of opacity change on gradient stop
This commit is contained in:
Alejandro Alonso 2025-06-18 07:32:34 +02:00 committed by GitHub
commit 9930f54558
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 3 deletions

View file

@ -10,6 +10,7 @@
[app.common.colors :as cc]
[app.common.data :as d]
[app.common.data.macros :as dm]
[app.common.types.color :as types.color]
[app.common.types.shape.attrs :refer [default-color]]
[app.main.data.modal :as modal]
[app.main.data.workspace.colors :as dwc]
@ -125,7 +126,8 @@
(fn [value]
(let [color (-> color
(assoc :opacity (/ value 100))
(dissoc :ref-id :ref-file))]
(dissoc :ref-id :ref-file)
(select-keys types.color/color-attrs))]
(st/emit! (dwc/add-recent-color color)
(on-change color)))))