From a8537521292b366ebd5666469439fb504ccdccd6 Mon Sep 17 00:00:00 2001 From: Rasmus Eneman Date: Thu, 11 Jun 2020 01:12:22 +0200 Subject: [PATCH] Support setting text direction via comand palette (#2194) (#2195) --- src/renderer/commands/index.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/renderer/commands/index.js b/src/renderer/commands/index.js index 24fdaa6e..478f7f1f 100644 --- a/src/renderer/commands/index.js +++ b/src/renderer/commands/index.js @@ -646,6 +646,23 @@ const commands = [ } }, + { + id: 'view.text-direction', + description: 'View: Set Text Direction', + subcommands: [{ + id: 'view.text-direction-ltr', + description: 'Left to Right', + value: 'ltr' + }, { + id: 'view.text-direction-rtl', + description: 'Right to Left', + value: 'rtl' + }], + executeSubcommand: async (_, value) => { + ipcRenderer.send('mt::set-user-preference', { textDirection: value }) + } + }, + // -------------------------------------------------------------------------- // Mark Text