(x: number, y: number)
| 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) { |