Revert "client: Move ribbon at the bottom"

This reverts commit 9b4ae87ef875d83c8735743972663f82913c9ff3.
This commit is contained in:
Elian Doran
2024-10-31 23:44:32 +02:00
parent db0911cc28
commit 4032135505
2 changed files with 30 additions and 30 deletions

View File

@@ -121,7 +121,29 @@ export default class DesktopLayout {
.collapsible()
.id('center-pane')
.child(new SplitNoteContainer(() =>
new NoteWrapperWidget()
new NoteWrapperWidget()
.child(
new RibbonContainer()
// the order of the widgets matter. Some of these want to "activate" themselves
// when visible. When this happens to multiple of them, the first one "wins".
// promoted attributes should always win.
.ribbon(new ScriptExecutorWidget())
.ribbon(new SearchDefinitionWidget())
.ribbon(new EditedNotesWidget())
.ribbon(new BookPropertiesWidget())
.ribbon(new NotePropertiesWidget())
.ribbon(new FilePropertiesWidget())
.ribbon(new ImagePropertiesWidget())
.ribbon(new BasicPropertiesWidget())
.ribbon(new OwnedAttributeListWidget())
.ribbon(new InheritedAttributesWidget())
.ribbon(new NotePathsWidget())
.ribbon(new NoteMapRibbonWidget())
.ribbon(new SimilarNotesWidget())
.ribbon(new NoteInfoWidget())
.button(new RevisionsButton())
.button(new NoteActionsWidget())
)
.child(new SharedInfoWidget())
.child(new WatchedFileUpdateStatusWidget())
.child(new FloatingButtons()
@@ -166,28 +188,6 @@ export default class DesktopLayout {
...this.customWidgets.get('node-detail-pane'), // typo, let's keep it for a while as BC
...this.customWidgets.get('note-detail-pane')
)
.child(
new RibbonContainer()
// the order of the widgets matter. Some of these want to "activate" themselves
// when visible. When this happens to multiple of them, the first one "wins".
// promoted attributes should always win.
.ribbon(new ScriptExecutorWidget())
.ribbon(new SearchDefinitionWidget())
.ribbon(new EditedNotesWidget())
.ribbon(new BookPropertiesWidget())
.ribbon(new NotePropertiesWidget())
.ribbon(new FilePropertiesWidget())
.ribbon(new ImagePropertiesWidget())
.ribbon(new BasicPropertiesWidget())
.ribbon(new OwnedAttributeListWidget())
.ribbon(new InheritedAttributesWidget())
.ribbon(new NotePathsWidget())
.ribbon(new NoteMapRibbonWidget())
.ribbon(new SimilarNotesWidget())
.ribbon(new NoteInfoWidget())
.button(new RevisionsButton())
.button(new NoteActionsWidget())
)
)
)
.child(...this.customWidgets.get('center-pane'))

View File

@@ -6,7 +6,7 @@ const TPL = `
<div class="ribbon-container">
<style>
.ribbon-container {
margin-top: 5px;
margin-bottom: 5px;
}
.ribbon-top-row {
@@ -24,7 +24,7 @@ const TPL = `
.ribbon-tab-title {
color: var(--muted-text-color);
border-top: 1px solid var(--main-border-color);
border-bottom: 1px solid var(--main-border-color);
min-width: 24px;
flex-basis: 24px;
max-width: max-content;
@@ -39,7 +39,7 @@ const TPL = `
.ribbon-tab-title.active {
color: var(--main-text-color);
border-top: 3px solid var(--main-text-color);
border-bottom: 3px solid var(--main-text-color);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
@@ -62,7 +62,7 @@ const TPL = `
min-width: 0;
max-width: 35px;
flex-grow: 1;
border-top: 1px solid var(--main-border-color);
border-bottom: 1px solid var(--main-border-color);
}
.ribbon-tab-spacer:last-of-type {
@@ -74,7 +74,7 @@ const TPL = `
.ribbon-button-container {
display: flex;
border-top: 1px solid var(--main-border-color);
border-bottom: 1px solid var(--main-border-color);
margin-right: 5px;
}
@@ -86,9 +86,9 @@ const TPL = `
.ribbon-body {
display: none;
border-top: 1px solid var(--main-border-color);
border-bottom: 1px solid var(--main-border-color);
margin-left: 10px;
margin-right: 5px; /* needs to have this value so that the top border is the same width as the top one */
margin-right: 5px; /* needs to have this value so that the bottom border is the same width as the top one */
}
.ribbon-body.active {