Skip to content

Build your personal knowledge base with Trilium Notes

feat(client): display different icon to toggle sidebar on horizontal layout

Elian Doran4ecf49b17538
diff --git a/src/public/app/widgets/buttons/left_pane_toggle.js b/src/public/app/widgets/buttons/left_pane_toggle.js
index b3b0e1f3a3..f58c529e39 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")