0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-14 11:09:04 -05:00

Merge pull request #1903 from penpot/eva-bugfix-handoff

🐛 Show strokes and fills for texts when in handoff
This commit is contained in:
Alejandro 2022-05-13 13:11:23 +02:00 committed by GitHub
commit 4b0b7463c7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 14 additions and 12 deletions

View file

@ -144,7 +144,7 @@
.color-bullet { .color-bullet {
width: 24px; width: 24px;
height: 24px; height: 24px;
border-radius: $br-small; border-radius: 50%;
border: 1px solid $color-gray-60; border: 1px solid $color-gray-60;
} }

View file

@ -27,7 +27,7 @@
:circle [:layout :fill :stroke :shadow :blur :svg] :circle [:layout :fill :stroke :shadow :blur :svg]
:path [:layout :fill :stroke :shadow :blur :svg] :path [:layout :fill :stroke :shadow :blur :svg]
:image [:image :layout :fill :stroke :shadow :blur :svg] :image [:image :layout :fill :stroke :shadow :blur :svg]
:text [:layout :text :shadow :blur]}) :text [:layout :text :shadow :blur :stroke]})
(mf/defc attributes (mf/defc attributes
[{:keys [page-id file-id shapes frame]}] [{:keys [page-id file-id shapes frame]}]

View file

@ -58,7 +58,7 @@
(for [shape shapes] (for [shape shapes]
(if (seq (:fills shape)) (if (seq (:fills shape))
(for [value (:fills shape [])] (for [value (:fills shape [])]
[:& fill-block {:key (str "fill-block-" (:id shape)) [:& fill-block {:key (str "fill-block-" (:id shape) value)
:shape value}]) :shape value}])
[:& fill-block {:key (str "fill-block-" (:id shape)) [:& fill-block {:key (str "fill-block-only" (:id shape))
:shape shape}]))]))) :shape shape}]))])))

View file

@ -84,7 +84,7 @@
(for [shape shapes] (for [shape shapes]
(if (seq (:strokes shape)) (if (seq (:strokes shape))
(for [value (:strokes shape [])] (for [value (:strokes shape [])]
[:& stroke-block {:key (str "stroke-color-" (:id shape)) [:& stroke-block {:key (str "stroke-color-" (:id shape) value)
:shape value}]) :shape value}])
[:& stroke-block {:key (str "stroke-color-" (:id shape)) [:& stroke-block {:key (str "stroke-color-only" (:id shape))
:shape shape}]))]))) :shape shape}]))])))

View file

@ -101,12 +101,13 @@
[:div.attributes-content-row [:div.attributes-content-row
[:pre.attributes-content (str/trim text)] [:pre.attributes-content (str/trim text)]
[:& copy-button {:data (str/trim text)}]] [:& copy-button {:data (str/trim text)}]]
(when (:fills style)
(for [fill (:fills style)]
(when (or (:fill-color style) (:fill-color-gradient style))
[:& color-row {:format @color-format [:& color-row {:format @color-format
:color (shape->color style) :color (shape->color fill)
:copy-data (copy-style-data style :fill-color :fill-color-gradient) :copy-data (copy-style-data fill :fill-color :fill-color-gradient)
:on-change-format #(reset! color-format %)}]) :on-change-format #(reset! color-format %)}]))
(when (:font-id style) (when (:font-id style)
[:div.attributes-unit-row [:div.attributes-unit-row
@ -186,4 +187,5 @@
[:div.attributes-block-title-text (tr "handoff.attributes.typography")]] [:div.attributes-block-title-text (tr "handoff.attributes.typography")]]
(for [shape shapes] (for [shape shapes]
[:& text-block {:shape shape}])])) [:& text-block {:shape shape
:key (str "text-block" (:id shape))}])]))