From 5d1fc9a59121abf35533191c4fd765ee1972a480 Mon Sep 17 00:00:00 2001 From: Abdo Date: Tue, 9 Jan 2024 04:09:53 +0300 Subject: [PATCH] Flip indent/outdent buttons for RTL (#2930) --- ts/editor/editor-toolbar/BlockButtons.svelte | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ts/editor/editor-toolbar/BlockButtons.svelte b/ts/editor/editor-toolbar/BlockButtons.svelte index 9ca7d3cfc..dbb08d113 100644 --- a/ts/editor/editor-toolbar/BlockButtons.svelte +++ b/ts/editor/editor-toolbar/BlockButtons.svelte @@ -75,6 +75,8 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html $: if (disabled) { showFloating = false; } + + const rtl = window.getComputedStyle(document.body).direction === "rtl"; @@ -163,6 +165,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html outdentKeyCombination, )})" {disabled} + flipX={rtl} on:click={outdentListItem} --border-left-radius="5px" --border-right-radius="0px" @@ -175,6 +178,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html indentKeyCombination, )})" {disabled} + flipX={rtl} on:click={indentListItem} --border-right-radius="5px" >