mirror of
https://github.com/penpot/penpot.git
synced 2025-12-12 06:24:17 +01:00
🐛 Remove shortcuts for inc/dec line height and letter spacing (#7337)
This commit is contained in:
@@ -46,6 +46,7 @@
|
|||||||
- Fix incorrect date displayed for support plan [Taiga #11986](https://tree.taiga.io/project/penpot/issue/11986)
|
- Fix incorrect date displayed for support plan [Taiga #11986](https://tree.taiga.io/project/penpot/issue/11986)
|
||||||
- Fix can't import 'borderWidth' type token [#132](https://github.com/tokens-studio/penpot/issues/132)
|
- Fix can't import 'borderWidth' type token [#132](https://github.com/tokens-studio/penpot/issues/132)
|
||||||
- Fix moving elements up or down while pressing alt [Taiga Issue #11992](https://tree.taiga.io/project/penpot/issue/11992)
|
- Fix moving elements up or down while pressing alt [Taiga Issue #11992](https://tree.taiga.io/project/penpot/issue/11992)
|
||||||
|
- Fix conflicting shortcuts (remove dec/inc line height and letter spacing) [Taiga #12102](https://tree.taiga.io/project/penpot/issue/12102)
|
||||||
|
|
||||||
## 2.9.0
|
## 2.9.0
|
||||||
|
|
||||||
|
|||||||
@@ -139,21 +139,11 @@
|
|||||||
(defn- update-attrs [shape props]
|
(defn- update-attrs [shape props]
|
||||||
(let [text-values (calculate-text-values shape)
|
(let [text-values (calculate-text-values shape)
|
||||||
font-size (d/parse-double (:font-size text-values))
|
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
|
props (cond
|
||||||
(:font-size-inc props)
|
(:font-size-inc props)
|
||||||
{:font-size (str (inc font-size))}
|
{:font-size (str (inc font-size))}
|
||||||
(:font-size-dec props)
|
(:font-size-dec props)
|
||||||
{:font-size (str (dec font-size))}
|
{: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
|
(= (:text-decoration props) "toggle-underline") ;;toggle
|
||||||
(if (= (:text-decoration text-values) "underline")
|
(if (= (:text-decoration text-values) "underline")
|
||||||
{:text-decoration "none"}
|
{:text-decoration "none"}
|
||||||
@@ -268,26 +258,6 @@
|
|||||||
:subsections [:text-editor]
|
:subsections [:text-editor]
|
||||||
:fn #(update-attrs-when-no-readonly {:font-size-dec true})}
|
: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")
|
:bold {:tooltip (ds/meta "b")
|
||||||
:command (ds/c-mod "b")
|
:command (ds/c-mod "b")
|
||||||
:subsections [:text-editor]
|
:subsections [:text-editor]
|
||||||
|
|||||||
@@ -126,10 +126,6 @@
|
|||||||
(tr "shortcuts.insert-image")
|
(tr "shortcuts.insert-image")
|
||||||
(tr "shortcuts.italic")
|
(tr "shortcuts.italic")
|
||||||
(tr "shortcuts.join-nodes")
|
(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.line-through")
|
||||||
(tr "shortcuts.make-corner")
|
(tr "shortcuts.make-corner")
|
||||||
(tr "shortcuts.make-curve")
|
(tr "shortcuts.make-curve")
|
||||||
|
|||||||
@@ -4030,22 +4030,6 @@ msgstr "Toggle italic"
|
|||||||
msgid "shortcuts.join-nodes"
|
msgid "shortcuts.join-nodes"
|
||||||
msgstr "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
|
#: src/app/main/ui/workspace/sidebar/shortcuts.cljs:131
|
||||||
msgid "shortcuts.line-through"
|
msgid "shortcuts.line-through"
|
||||||
msgstr "Toggle line through"
|
msgstr "Toggle line through"
|
||||||
|
|||||||
@@ -4029,22 +4029,6 @@ msgstr "Alternar cursiva"
|
|||||||
msgid "shortcuts.join-nodes"
|
msgid "shortcuts.join-nodes"
|
||||||
msgstr "Unir nodos"
|
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
|
#: src/app/main/ui/workspace/sidebar/shortcuts.cljs:131
|
||||||
msgid "shortcuts.line-through"
|
msgid "shortcuts.line-through"
|
||||||
msgstr "Alternar tachado"
|
msgstr "Alternar tachado"
|
||||||
|
|||||||
Reference in New Issue
Block a user