mirror of
https://github.com/penpot/penpot.git
synced 2025-12-11 22:14:05 +01:00
🐛 Remove shortcuts for inc/dec line height and letter spacing (#7337)
This commit is contained in:
@@ -139,21 +139,11 @@
|
||||
(defn- update-attrs [shape props]
|
||||
(let [text-values (calculate-text-values shape)
|
||||
font-size (d/parse-double (:font-size text-values))
|
||||
line-height (d/parse-double (:line-height text-values))
|
||||
letter-spacing (d/parse-double (:letter-spacing text-values))
|
||||
props (cond
|
||||
(:font-size-inc props)
|
||||
{:font-size (str (inc font-size))}
|
||||
(:font-size-dec props)
|
||||
{:font-size (str (dec font-size))}
|
||||
(:line-height-inc props)
|
||||
{:line-height (str (+ line-height 0.1))}
|
||||
(:line-height-dec props)
|
||||
{:line-height (str (- line-height 0.1))}
|
||||
(:letter-spacing-inc props)
|
||||
{:letter-spacing (str (+ letter-spacing 0.1))}
|
||||
(:letter-spacing-dec props)
|
||||
{:letter-spacing (str (- letter-spacing 0.1))}
|
||||
(= (:text-decoration props) "toggle-underline") ;;toggle
|
||||
(if (= (:text-decoration text-values) "underline")
|
||||
{:text-decoration "none"}
|
||||
@@ -268,26 +258,6 @@
|
||||
:subsections [:text-editor]
|
||||
:fn #(update-attrs-when-no-readonly {:font-size-dec true})}
|
||||
|
||||
:line-height-inc {:tooltip (ds/alt-shift ds/up-arrow)
|
||||
:command (ds/a-mod "shift+up")
|
||||
:subsections [:text-editor]
|
||||
:fn #(update-attrs-when-no-readonly {:line-height-inc true})}
|
||||
|
||||
:line-height-dec {:tooltip (ds/alt-shift ds/down-arrow)
|
||||
:command (ds/a-mod "shift+down")
|
||||
:subsections [:text-editor]
|
||||
:fn #(update-attrs-when-no-readonly {:line-height-dec true})}
|
||||
|
||||
:letter-spacing-inc {:tooltip (ds/alt ds/up-arrow)
|
||||
:command (ds/a-mod "up")
|
||||
:subsections [:text-editor]
|
||||
:fn #(update-attrs-when-no-readonly {:letter-spacing-inc true})}
|
||||
|
||||
:letter-spacing-dec {:tooltip (ds/alt ds/down-arrow)
|
||||
:command (ds/a-mod "down")
|
||||
:subsections [:text-editor]
|
||||
:fn #(update-attrs-when-no-readonly {:letter-spacing-dec true})}
|
||||
|
||||
:bold {:tooltip (ds/meta "b")
|
||||
:command (ds/c-mod "b")
|
||||
:subsections [:text-editor]
|
||||
|
||||
@@ -126,10 +126,6 @@
|
||||
(tr "shortcuts.insert-image")
|
||||
(tr "shortcuts.italic")
|
||||
(tr "shortcuts.join-nodes")
|
||||
(tr "shortcuts.letter-spacing-dec")
|
||||
(tr "shortcuts.letter-spacing-inc")
|
||||
(tr "shortcuts.line-height-dec")
|
||||
(tr "shortcuts.line-height-inc")
|
||||
(tr "shortcuts.line-through")
|
||||
(tr "shortcuts.make-corner")
|
||||
(tr "shortcuts.make-curve")
|
||||
|
||||
@@ -4030,22 +4030,6 @@ msgstr "Toggle italic"
|
||||
msgid "shortcuts.join-nodes"
|
||||
msgstr "Join nodes"
|
||||
|
||||
#: src/app/main/ui/workspace/sidebar/shortcuts.cljs:127
|
||||
msgid "shortcuts.letter-spacing-dec"
|
||||
msgstr "Decrement letter spacing"
|
||||
|
||||
#: src/app/main/ui/workspace/sidebar/shortcuts.cljs:128
|
||||
msgid "shortcuts.letter-spacing-inc"
|
||||
msgstr "Increment letter spacing"
|
||||
|
||||
#: src/app/main/ui/workspace/sidebar/shortcuts.cljs:129
|
||||
msgid "shortcuts.line-height-dec"
|
||||
msgstr "Decrement line height"
|
||||
|
||||
#: src/app/main/ui/workspace/sidebar/shortcuts.cljs:130
|
||||
msgid "shortcuts.line-height-inc"
|
||||
msgstr "Increment line height"
|
||||
|
||||
#: src/app/main/ui/workspace/sidebar/shortcuts.cljs:131
|
||||
msgid "shortcuts.line-through"
|
||||
msgstr "Toggle line through"
|
||||
|
||||
@@ -4029,22 +4029,6 @@ msgstr "Alternar cursiva"
|
||||
msgid "shortcuts.join-nodes"
|
||||
msgstr "Unir nodos"
|
||||
|
||||
#: src/app/main/ui/workspace/sidebar/shortcuts.cljs:127
|
||||
msgid "shortcuts.letter-spacing-dec"
|
||||
msgstr "Decrementar el espaciado de letras"
|
||||
|
||||
#: src/app/main/ui/workspace/sidebar/shortcuts.cljs:128
|
||||
msgid "shortcuts.letter-spacing-inc"
|
||||
msgstr "Incrementar el espaciado de letras"
|
||||
|
||||
#: src/app/main/ui/workspace/sidebar/shortcuts.cljs:129
|
||||
msgid "shortcuts.line-height-dec"
|
||||
msgstr "Decrementar el interlineado"
|
||||
|
||||
#: src/app/main/ui/workspace/sidebar/shortcuts.cljs:130
|
||||
msgid "shortcuts.line-height-inc"
|
||||
msgstr "Incrementar el interlineado"
|
||||
|
||||
#: src/app/main/ui/workspace/sidebar/shortcuts.cljs:131
|
||||
msgid "shortcuts.line-through"
|
||||
msgstr "Alternar tachado"
|
||||
|
||||
Reference in New Issue
Block a user