From 75639c53f0a758b49148cd1bd118581c9825a1f2 Mon Sep 17 00:00:00 2001 From: zadam Date: Wed, 14 Dec 2022 10:18:29 +0100 Subject: [PATCH] unhoist button on the left --- src/public/app/widgets/note_tree.js | 4 +++- src/public/stylesheets/tree.css | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/public/app/widgets/note_tree.js b/src/public/app/widgets/note_tree.js index 3b3333b95..aba4b7dab 100644 --- a/src/public/app/widgets/note_tree.js +++ b/src/public/app/widgets/note_tree.js @@ -550,7 +550,9 @@ export default class NoteTreeWidget extends NoteContextAwareWidget { if (isHoistedNote) { const $unhoistButton = $(''); - $span.append($unhoistButton); + // unhoist button is prepended since compared to other buttons this is not just convenience + // on the mobile interface - it's the only way to unhoist + $span.prepend($unhoistButton); } if (note.hasLabel('workspace') && !isHoistedNote) { diff --git a/src/public/stylesheets/tree.css b/src/public/stylesheets/tree.css index ddf9fc81b..dd70c50d8 100644 --- a/src/public/stylesheets/tree.css +++ b/src/public/stylesheets/tree.css @@ -211,6 +211,10 @@ span.fancytree-node.archived { border-radius: 5px; } +.unhoist-button.bx.tree-item-button { + margin-left: 0; /* unhoist button is on the left and doesn't need more margin */ +} + .tree-item-button:hover { border: 1px dotted var(--main-text-color); }