-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disabling resize on a window does nothing (or only partially works) #7504
Comments
I ran Also ran it against 0.46.2_64-sdk on Win 10 64. Same results. Though after applying it, if I moved the window (via clicking/dragging the title bar), a black border appeared around the edge of the window. If I minimized and restored the window the black border went away. This only occurs when going from a resizable window to a non-resizable. If the window was spawned with resizing disabled it does not occur. |
Thank you. I have no idea why mine did not work. Trying your one-liner works fine. Please pardon the noise. |
On a somewhat related note, is there a way to toggle maximize button on and off using a similar command? |
@TheJaredWilcurt I have tested your example and while it does work there are two side-effects. One is positive in that the maximize window becomes inactive which is something I was hoping to implement anyhow. The other, less desirable is that the title bar gets a bit smaller and leaves visual artifacts when one hovers over the minimize and close buttons located on it. Once one minimizes the window and restores it, it looks normal with the title bar being smaller and no artifacts present. This is on Windows 10 using 0.47beta1. is there any chance that this dynamic change artifact may be fixed before the official release of 0.47? |
The issue I mentioned is now posted here: #7521 |
Fixed in #7521 . Thanks. |
NWJS Version : 0.46.2 and the 0.47.0beta
Operating System : Windows 10 64bit (also tested on Ubuntu 16.04)
Expected behavior
When issuing the command win.setResizable(false) the win window should cease to be resizable.
Actual behavior
On 0.46.2 nothing happens, as if the command is completely ignored. On 0.47.0beta1 the window remains resizable but the newly added space is white while the main canvas does not resize.
How to reproduce
Oopen nw.exe, and in the console do:
var gui = require('nw.gui');
var win = gui.Window.get();
win.setResizable(false);
Observe that the window resizes regardless with the small variance in behavior as noted above.
I believe the same is also the case with disabling the maximize button.
The text was updated successfully, but these errors were encountered: