fix: macOS maximize button shouldn't be disabled just because the window is non-fullscreenable (#40705)
* fix: macOS maximize button shouldn't be disabled just because the window is non-fullscreenable * add test * fix test by enabling maximize button if `resizable && (maximizable || fullscreenable)` instead of `(resizable && maximizable) && fullscreenable`
This commit is contained in:
parent
22970f573b
commit
cc1b64e01c
3 changed files with 24 additions and 3 deletions
|
@ -5611,6 +5611,19 @@ describe('BrowserWindow module', () => {
|
|||
expect(w2.isFullScreenable()).to.be.false('isFullScreenable');
|
||||
expect(w3.isFullScreenable()).to.be.false('isFullScreenable');
|
||||
});
|
||||
|
||||
it('does not disable maximize button if window is resizable', () => {
|
||||
const w = new BrowserWindow({
|
||||
resizable: true,
|
||||
fullscreenable: false
|
||||
});
|
||||
|
||||
expect(w.isMaximizable()).to.be.true('isMaximizable');
|
||||
|
||||
w.setResizable(false);
|
||||
|
||||
expect(w.isMaximizable()).to.be.false('isMaximizable');
|
||||
});
|
||||
});
|
||||
|
||||
ifdescribe(process.platform === 'darwin')('isHiddenInMissionControl state', () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue