mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-09-04 14:41:42 +08:00
feat(client): reorder buttons on horizontal bar
This commit is contained in:
parent
efc84722a9
commit
c9f2a2bd6b
@ -93,12 +93,7 @@ export default class DesktopLayout {
|
|||||||
appContext.noteTreeWidget = new NoteTreeWidget();
|
appContext.noteTreeWidget = new NoteTreeWidget();
|
||||||
|
|
||||||
const launcherPaneIsHorizontal = true;
|
const launcherPaneIsHorizontal = true;
|
||||||
const launcherPane = new FlexContainer(launcherPaneIsHorizontal ? "row" : "column")
|
const launcherPane = this.#buildLauncherPane(launcherPaneIsHorizontal);
|
||||||
.id("launcher-pane")
|
|
||||||
.css(launcherPaneIsHorizontal ? "height" : "width", "53px")
|
|
||||||
.child(new GlobalMenuWidget())
|
|
||||||
.child(new LauncherContainer(launcherPaneIsHorizontal))
|
|
||||||
.child(new LeftPaneToggleWidget());
|
|
||||||
|
|
||||||
return new RootContainer()
|
return new RootContainer()
|
||||||
.setParent(appContext)
|
.setParent(appContext)
|
||||||
@ -231,4 +226,25 @@ export default class DesktopLayout {
|
|||||||
.child(new ConfirmDialog())
|
.child(new ConfirmDialog())
|
||||||
.child(new PromptDialog());
|
.child(new PromptDialog());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#buildLauncherPane(isHorizontal) {
|
||||||
|
let launcherPane;
|
||||||
|
|
||||||
|
if (isHorizontal) {
|
||||||
|
launcherPane = new FlexContainer("row")
|
||||||
|
.css("height", "53px")
|
||||||
|
.child(new LeftPaneToggleWidget())
|
||||||
|
.child(new LauncherContainer(isHorizontal))
|
||||||
|
.child(new GlobalMenuWidget())
|
||||||
|
} else {
|
||||||
|
launcherPane = new FlexContainer("column")
|
||||||
|
.css("width", "53px")
|
||||||
|
.child(new GlobalMenuWidget())
|
||||||
|
.child(new LauncherContainer(isHorizontal))
|
||||||
|
.child(new LeftPaneToggleWidget());
|
||||||
|
}
|
||||||
|
|
||||||
|
launcherPane.id("launcher-pane");
|
||||||
|
return launcherPane;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user