mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-30 19:52:28 +08:00
fix(client): tooltip position for hide left pane button
This commit is contained in:
parent
fd8f9506d4
commit
7e5fea8cd2
@ -239,16 +239,16 @@ export default class DesktopLayout {
|
|||||||
launcherPane = new FlexContainer("row")
|
launcherPane = new FlexContainer("row")
|
||||||
.css("height", "53px")
|
.css("height", "53px")
|
||||||
.class("horizontal")
|
.class("horizontal")
|
||||||
.child(new LeftPaneToggleWidget())
|
.child(new LeftPaneToggleWidget(true))
|
||||||
.child(new LauncherContainer(isHorizontal))
|
.child(new LauncherContainer(true))
|
||||||
.child(new GlobalMenuWidget(true))
|
.child(new GlobalMenuWidget(true))
|
||||||
} else {
|
} else {
|
||||||
launcherPane = new FlexContainer("column")
|
launcherPane = new FlexContainer("column")
|
||||||
.css("width", "53px")
|
.css("width", "53px")
|
||||||
.class("vertical")
|
.class("vertical")
|
||||||
.child(new GlobalMenuWidget(false))
|
.child(new GlobalMenuWidget(false))
|
||||||
.child(new LauncherContainer(isHorizontal))
|
.child(new LauncherContainer(false))
|
||||||
.child(new LeftPaneToggleWidget());
|
.child(new LeftPaneToggleWidget(false));
|
||||||
}
|
}
|
||||||
|
|
||||||
launcherPane.id("launcher-pane");
|
launcherPane.id("launcher-pane");
|
||||||
|
@ -26,7 +26,8 @@ export default class AbstractButtonWidget extends NoteContextAwareWidget {
|
|||||||
html: true,
|
html: true,
|
||||||
title: () => this.getTitle(),
|
title: () => this.getTitle(),
|
||||||
trigger: 'hover',
|
trigger: 'hover',
|
||||||
placement: this.settings.titlePlacement
|
placement: this.settings.titlePlacement,
|
||||||
|
fallbackPlacements: [ this.settings.titlePlacement ]
|
||||||
})
|
})
|
||||||
|
|
||||||
if (this.settings.onContextMenu) {
|
if (this.settings.onContextMenu) {
|
||||||
|
@ -4,7 +4,7 @@ import CommandButtonWidget from "./command_button.js";
|
|||||||
import { t } from "../../services/i18n.js";
|
import { t } from "../../services/i18n.js";
|
||||||
|
|
||||||
export default class LeftPaneToggleWidget extends CommandButtonWidget {
|
export default class LeftPaneToggleWidget extends CommandButtonWidget {
|
||||||
constructor() {
|
constructor(isHorizontalLayout) {
|
||||||
super();
|
super();
|
||||||
|
|
||||||
this.class("launcher-button");
|
this.class("launcher-button");
|
||||||
@ -20,6 +20,11 @@ export default class LeftPaneToggleWidget extends CommandButtonWidget {
|
|||||||
this.settings.command = () => options.is('leftPaneVisible')
|
this.settings.command = () => options.is('leftPaneVisible')
|
||||||
? "hideLeftPane"
|
? "hideLeftPane"
|
||||||
: "showLeftPane";
|
: "showLeftPane";
|
||||||
|
|
||||||
|
if (isHorizontalLayout) {
|
||||||
|
this.settings.titlePlacement = "bottom";
|
||||||
|
}
|
||||||
|
console.log(this.settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
refreshIcon() {
|
refreshIcon() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user