parent
6c085cda74
commit
8f743e6fbe
2 changed files with 8 additions and 1 deletions
|
@ -585,6 +585,7 @@ void NativeWindowViews::SetResizable(bool resizable) {
|
||||||
// both the minimum and maximum size to the window size to achieve it.
|
// both the minimum and maximum size to the window size to achieve it.
|
||||||
if (resizable) {
|
if (resizable) {
|
||||||
SetContentSizeConstraints(old_size_constraints_);
|
SetContentSizeConstraints(old_size_constraints_);
|
||||||
|
SetMaximizable(maximizable_);
|
||||||
} else {
|
} else {
|
||||||
old_size_constraints_ = GetContentSizeConstraints();
|
old_size_constraints_ = GetContentSizeConstraints();
|
||||||
resizable_ = false;
|
resizable_ = false;
|
||||||
|
|
|
@ -2394,9 +2394,15 @@ describe('BrowserWindow module', () => {
|
||||||
// Only implemented on windows.
|
// Only implemented on windows.
|
||||||
if (process.platform !== 'win32') return
|
if (process.platform !== 'win32') return
|
||||||
|
|
||||||
it('is set to false when resizable state is set to false', () => {
|
it('is reset to its former state', () => {
|
||||||
|
w.setMaximizable(false)
|
||||||
w.setResizable(false)
|
w.setResizable(false)
|
||||||
|
w.setResizable(true)
|
||||||
assert.equal(w.isMaximizable(), false)
|
assert.equal(w.isMaximizable(), false)
|
||||||
|
w.setMaximizable(true)
|
||||||
|
w.setResizable(false)
|
||||||
|
w.setResizable(true)
|
||||||
|
assert.strictEqual(w.isMaximizable(), true)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue