0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-03 04:49:03 -05:00

🐛 Fix problem with gradient fill text

This commit is contained in:
alonso.torres 2024-03-25 09:20:12 +01:00
parent 81a271961f
commit 5a30c5e584
2 changed files with 10 additions and 2 deletions

View file

@ -121,7 +121,10 @@
[:& filters/filters {:shape shape :filter-id filter-id}]
[:& filters/filters {:shape shape-without-blur :filter-id (dm/fmt "filter-shadow-%" render-id)}]
[:& filters/filters {:shape shape-without-shadows :filter-id (dm/fmt "filter-blur-%" render-id)}]
[:& fills/fills {:shape shape :render-id render-id}]
[:& frame/frame-clip-def {:shape shape :render-id render-id}]]
[:& frame/frame-clip-def {:shape shape :render-id render-id}]
;; Text fills need to be defined afterwards because they are specified per text-block
(when-not (cfh/text-shape? shape)
[:& fills/fills {:shape shape :render-id render-id}])]
children]]))

View file

@ -13,6 +13,7 @@
[app.main.ui.context :as muc]
[app.main.ui.shapes.attrs :as attrs]
[app.main.ui.shapes.custom-stroke :refer [shape-custom-strokes]]
[app.main.ui.shapes.fills :as fills]
[app.main.ui.shapes.gradients :as grad]
[app.util.object :as obj]
[rumext.v2 :as mf]))
@ -103,5 +104,9 @@
render-id (dm/str render-id "-" index)]
[:& (mf/provider muc/render-id) {:key index :value render-id}
;; Text fills definition. Need to be defined per-text block
[:defs
[:& fills/fills {:shape shape :render-id render-id}]]
[:& shape-custom-strokes {:shape shape :position index :render-id render-id}
[:> :text props (:text data)]]]))]]))