mirror of
https://github.com/penpot/penpot.git
synced 2025-05-28 19:56:13 +02:00
🐛 Fix default color fill for textx
This commit is contained in:
parent
88120b83bd
commit
e0b7001a09
4 changed files with 11 additions and 9 deletions
|
@ -24,7 +24,7 @@
|
|||
|
||||
(mf/defc fill-menu
|
||||
{::mf/wrap [#(mf/memo' % (mf/check-props ["ids" "values"]))]}
|
||||
[{:keys [ids type values] :as props}]
|
||||
[{:keys [ids type values disable-remove?] :as props}]
|
||||
(let [show? (or (not (nil? (:fill-color values)))
|
||||
(not (nil? (:fill-color-gradient values))))
|
||||
|
||||
|
@ -75,7 +75,8 @@
|
|||
[:div.element-set
|
||||
[:div.element-set-title
|
||||
[:span label]
|
||||
[:div.add-page {:on-click on-delete} i/minus]]
|
||||
(when (not disable-remove?)
|
||||
[:div.add-page {:on-click on-delete} i/minus])]
|
||||
|
||||
[:div.element-set-content
|
||||
[:& color-row {:color color
|
||||
|
@ -87,5 +88,3 @@
|
|||
[:div.element-set-title
|
||||
[:span label]
|
||||
[:div.add-page {:on-click on-add} i/close]]])))
|
||||
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
(ns app.main.ui.workspace.sidebar.options.shapes.text
|
||||
(:require
|
||||
[app.common.colors :as clr]
|
||||
[app.common.data :as d]
|
||||
[app.main.data.workspace.texts :as dwt]
|
||||
[app.main.refs :as refs]
|
||||
|
@ -36,6 +37,8 @@
|
|||
fill-values (d/update-in-when fill-values [:fill-color-gradient :type] keyword)
|
||||
|
||||
fill-values (cond-> fill-values
|
||||
(not (contains? fill-values :fill-color)) (assoc :fill-color clr/black)
|
||||
(not (contains? fill-values :fill-opacity)) (assoc :fill-opacity 1)
|
||||
;; Keep for backwards compatibility
|
||||
(:fill fill-values) (assoc :fill-color (:fill fill-values))
|
||||
(:opacity fill-values) (assoc :fill-opacity (:fill fill-values)))
|
||||
|
@ -73,7 +76,8 @@
|
|||
[:& fill-menu
|
||||
{:ids ids
|
||||
:type type
|
||||
:values fill-values}]
|
||||
:values fill-values
|
||||
:disable-remove? true}]
|
||||
|
||||
[:& shadow-menu
|
||||
{:ids ids
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue