MCPcopy
hub / github.com/CopyTranslator/CopyTranslator / createMain

Method createMain

src/main/views/manager.ts:320–347  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

318 }
319
320 createMain() {
321 let window_config = {
322 x: 535,
323 y: 186,
324 height: 600,
325 width: 1094,
326 show: false,
327 frame: false,
328 title: "CopyTranslator",
329 transparent: true,
330 };
331 const previous_config = config.get<LayoutConfig>(config.get("layoutType"));
332 window_config = { ...window_config, ...previous_config };
333 const window = this.createWindow("contrast", window_config, true);
334 window.on("blur", () => {
335 this.edgeHide(this.onEdge());
336 });
337 window.on("focus", () => {
338 this.edgeShow();
339 });
340 window.on("resize", () => {
341 this.saver.call();
342 });
343 window.on("move", () => {
344 this.saver.call();
345 });
346 return window;
347 }
348
349 getDisplay() {
350 return screen.getDisplayNearestPoint(screen.getCursorScreenPoint());

Callers 1

createMethod · 0.95

Calls 7

createWindowMethod · 0.95
edgeHideMethod · 0.95
onEdgeMethod · 0.95
edgeShowMethod · 0.95
onMethod · 0.80
callMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected