fix ribbon shrinking/wrap

This commit is contained in:
zadam 2021-06-05 22:40:17 +02:00
parent 6d51593b7d
commit 882912826f
4 changed files with 17 additions and 6 deletions

3
TODO
View file

@ -1 +1,4 @@
- search should not require a note
- all ribbon tabs should have assignable shortcut
- new icon
- green theme

View file

@ -33,8 +33,8 @@ function setupLeftPaneResizer(leftPaneVisible) {
function setupRightPaneResizer() {
if (rightInstance) {
leftInstance.destroy();
leftInstance = null;
rightInstance.destroy();
rightInstance = null;
}
const rightPaneVisible = $("#right-pane").is(":visible");

View file

@ -23,6 +23,10 @@ const TPL = `
.ribbon-tab-title {
color: var(--muted-text-color);
border-bottom: 1px solid var(--main-border-color);
min-width: 24px;
flex-basis: 24px;
max-width: fit-content;
flex-grow: 10;
}
.ribbon-tab-title .bx {
@ -34,7 +38,6 @@ const TPL = `
.ribbon-tab-title.active {
color: var(--main-text-color);
border-bottom: 1px solid var(--main-text-color);
flex-shrink: 1;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
@ -53,14 +56,18 @@ const TPL = `
}
.ribbon-tab-spacer {
flex-basis: 35px;
flex-shrink: 1;
flex-basis: 0;
min-width: 0;
max-width: 35px;
flex-grow: 1;
border-bottom: 1px solid var(--main-border-color);
}
.ribbon-tab-spacer:last-of-type {
flex-shrink: 1;
flex-grow: 1;
flex-basis: 0;
min-width: 0;
max-width: 10000px;
}
.ribbon-button-container {

View file

@ -18,6 +18,7 @@ export default class SplitNoteContainer extends FlexContainer {
const $renderedWidget = widget.render();
$renderedWidget.attr("data-ntx-id", noteContext.ntxId);
$renderedWidget.css("flex-basis", "0"); // so that each split has same width
$renderedWidget.on('click', () => appContext.tabManager.activateNoteContext(noteContext.ntxId));