MCPcopy Index your code
hub / github.com/ZToolsCenter/ZTools / setWindowPosition

Method setWindowPosition

src/main/api/renderer/window.ts:120–132  ·  view source on GitHub ↗
(x: number, y: number)

Source from the content-addressed store, hash-verified

118 }
119
120 public setWindowPosition(x: number, y: number): void {
121 if (this.mainWindow && this.lockedSize) {
122 // 拖动时强制保持锁定的尺寸
123 this.mainWindow.setBounds({
124 x: Math.round(x),
125 y: Math.round(y),
126 width: this.lockedSize.width,
127 height: this.lockedSize.height
128 })
129 } else if (this.mainWindow) {
130 this.mainWindow.setPosition(x, y)
131 }
132 }
133
134 public setWindowOpacity(opacity: number): void {
135 if (this.mainWindow) {

Callers 1

setupIPCMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected