backend API to create a launcher

This commit is contained in:
zadam
2022-12-22 14:57:00 +01:00
parent 059c339c09
commit 8ec2547b4a
32 changed files with 947 additions and 173 deletions

View File

@@ -1,4 +1,6 @@
import BasicWidget from "./basic_widget.js";
import contextMenu from "../menus/context_menu.js";
import appContext from "../components/app_context.js";
const TPL = `<div class="spacer"></div>`;
@@ -15,5 +17,20 @@ export default class SpacerWidget extends BasicWidget {
this.$widget.css("flex-basis", this.baseSize);
this.$widget.css("flex-grow", this.growthFactor);
this.$widget.css("flex-shrink", 1000);
this.$widget.on("contextmenu", e => {
this.$widget.tooltip("hide");
contextMenu.show({
x: e.pageX,
y: e.pageY,
items: [
{title: "Configure Launchbar", command: "showLaunchBarSubtree", uiIcon: "bx bx-sidebar"}
],
selectMenuItemHandler: ({command}) => {
appContext.triggerCommand(command);
}
});
});
}
}