From 4ecf49b17538002370ed5743299f590cd5ef4a35 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Sat, 30 Nov 2024 01:23:54 +0200 Subject: [PATCH] feat(client): display different icon to toggle sidebar on horizontal layout --- src/public/app/widgets/buttons/left_pane_toggle.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/public/app/widgets/buttons/left_pane_toggle.js b/src/public/app/widgets/buttons/left_pane_toggle.js index b3b0e1f3a..f58c529e3 100644 --- a/src/public/app/widgets/buttons/left_pane_toggle.js +++ b/src/public/app/widgets/buttons/left_pane_toggle.js @@ -9,9 +9,13 @@ export default class LeftPaneToggleWidget extends CommandButtonWidget { this.class(isHorizontalLayout ? "toggle-button" : "launcher-button"); - this.settings.icon = () => options.is('leftPaneVisible') - ? "bx-chevrons-left" - : "bx-chevrons-right"; + this.settings.icon = () => { + if (options.get("layoutOrientation") === "horizontal") { + return "bx-sidebar"; + } + + return (options.is('leftPaneVisible') ? "bx-chevrons-left" : "bx-chevrons-right"); + }; this.settings.title = () => options.is('leftPaneVisible') ? t("left_pane_toggle.hide_panel")