fix global menu button and extra window

This commit is contained in:
zadam 2020-08-22 23:07:52 +02:00
parent 08c612c876
commit a6c79c934c
5 changed files with 9 additions and 7 deletions

View File

@ -8,8 +8,8 @@ import NoteTitleWidget from "../widgets/note_title.js";
import RunScriptButtonsWidget from "../widgets/run_script_buttons.js";
import NoteTypeWidget from "../widgets/note_type.js";
import NoteActionsWidget from "../widgets/note_actions.js";
import PromotedAttributesWidget from "../widgets/promoted_attributes.js";
import NoteDetailWidget from "../widgets/note_detail.js";
import AttributeListWidget from "../widgets/attribute_list.js";
export default class DesktopExtraWindowLayout {
constructor(customWidgets) {
@ -23,7 +23,7 @@ export default class DesktopExtraWindowLayout {
.setParent(appContext)
.id('root-widget')
.css('height', '100vh')
.child(new FlexContainer('row')
.child(new FlexContainer('row').overflowing()
.child(new GlobalMenuWidget())
.child(new TabRowWidget())
.child(new TitleBarButtonsWidget()))
@ -31,16 +31,17 @@ export default class DesktopExtraWindowLayout {
.collapsible()
.child(new FlexContainer('column').id('center-pane').css('flex-grow', '1')
.child(new FlexContainer('row').class('title-row')
.overflowing()
.cssBlock('.title-row > * { margin: 5px; }')
.child(new NoteTitleWidget())
.child(new RunScriptButtonsWidget().hideInZenMode())
.child(new NoteTypeWidget().hideInZenMode())
.child(new NoteActionsWidget().hideInZenMode())
)
.child(new TabCachingWidget(() => new PromotedAttributesWidget()))
.child(new TabCachingWidget(() => new AttributeListWidget()))
.child(new TabCachingWidget(() => new NoteDetailWidget()))
.child(...this.customWidgets.get('center-pane'))
)
);
}
}
}

View File

@ -109,7 +109,7 @@ export default class DesktopMainWindowLayout {
.setParent(appContext)
.id('root-widget')
.css('height', '100vh')
.child(new FlexContainer('row')
.child(new FlexContainer('row').overflowing()
.css('height', '35px')
.child(new GlobalMenuWidget())
.child(new TabRowWidget())

View File

@ -33,7 +33,7 @@ const WIDGET_TPL = `
class GlobalButtonsWidget extends BasicWidget {
doRender() {
this.$widget = $(WIDGET_TPL);
this.contentSized();
this.overflowing();
}
}

View File

@ -104,7 +104,7 @@ const TPL = `
export default class GlobalMenuWidget extends BasicWidget {
doRender() {
this.$widget = $(TPL);
this.contentSized();
this.overflowing();
this.$widget.find(".show-about-dialog-button").on('click',
() => import("../dialogs/about.js").then(d => d.showDialog()));

View File

@ -66,6 +66,7 @@ const TPL = `
export default class StandardTopWidget extends BasicWidget {
doRender() {
this.$widget = $(TPL);
this.overflowing();
const historyNavigationWidget = new HistoryNavigationWidget();
this.child(historyNavigationWidget);