Skip to content

Commit 9fd2bbd

Browse files
committed
feat: allow window to be resizable
- Set WindowConfig.resizable to true - Remove resizable = false in DevTools closed event - Update test to expect resizable = true Fixes #2441
1 parent ae756ae commit 9fd2bbd

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/main/config.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ describe('main/config.ts', () => {
3030
expect(WindowConfig.height).toBe(400);
3131
expect(WindowConfig.minWidth).toBe(500);
3232
expect(WindowConfig.minHeight).toBe(400);
33-
expect(WindowConfig.resizable).toBe(false);
33+
expect(WindowConfig.resizable).toBe(true);
3434
expect(WindowConfig.skipTaskbar).toBe(true);
3535
expect(WindowConfig.webPreferences).toBeDefined();
3636
expect(WindowConfig.webPreferences.contextIsolation).toBe(true);

src/main/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export const WindowConfig: BrowserWindowConstructorOptions = {
4444
height: 400,
4545
minWidth: 500,
4646
minHeight: 400,
47-
resizable: false,
47+
resizable: true,
4848
/** Hide the app from the Windows taskbar */
4949
skipTaskbar: true,
5050
webPreferences: {

src/main/lifecycle/window.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ export function configureWindowEvents(mb: Menubar): void {
3434

3535
/**
3636
* When DevTools is closed, restore the window to its original size and position it centered on the tray icon.
37+
* Keep the window resizable to allow users to adjust the size at any time.
3738
*/
3839
mb.window.webContents.on('devtools-closed', () => {
3940
const trayBounds = mb.tray.getBounds();
4041
mb.window.setSize(WindowConfig.width, WindowConfig.height);
4142
mb.positioner.move('trayCenter', trayBounds);
42-
mb.window.resizable = false;
4343
});
4444
}

0 commit comments

Comments
 (0)