Skip to content
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

window options - prevent maximize? #58

Closed
hugorodrigues opened this issue Sep 22, 2012 · 11 comments
Closed

window options - prevent maximize? #58

hugorodrigues opened this issue Sep 22, 2012 · 11 comments

Comments

@hugorodrigues
Copy link

Hello!

Is possible to prevent the node-webkit window to be maximized or resized?

Best Regards

@zcbenz
Copy link
Contributor

zcbenz commented Sep 24, 2012

It's not possible now, ability to make window unresizable will be added in future

@respectTheCode
Copy link

As a work around you could open a new window with resizeable=no and then close the first window. The maximize button is still there but the window doesn't change sizes.

I am using something like this

window.open(
    "main.html",
    "Title",
    "width=300,height=350,location=no,toolbar=no,statusbar=no,resizeable=no"
);

window.close();

@zcbenz
Copy link
Contributor

zcbenz commented Sep 24, 2012

In fact, you set min_width, min_height, max_width, max_height to the same with width and height, which do the exact same thing with disabling resizing.

As for prevent maximize, did you mean hiding the maximize window button, or preventing the user to maximize the window? I don't think the latter is a good idea.

@hugorodrigues
Copy link
Author

Removing maximize button and prevent the user to manually change the native window size are both important.
Hidding the entire native window interface (chrome-less) will also be great.

A lame use for all this features: the spash intro window for an app

@kevsmt
Copy link

kevsmt commented Sep 30, 2012

Is there a way overriding the min_* & max_* on js? if so, u can set the default to the splash page size, and before you show your main app, hide it and do some stuff and show it w/ min_* and max_* to 'auto' if that is possible.

I really like node-webkit so far as I am gathering resources on this genre to be used for our internal app.

@zcbenz
Copy link
Contributor

zcbenz commented Oct 1, 2012

Not possible now but I'm working on the new native UI library that will enable it.

@zcbenz
Copy link
Contributor

zcbenz commented Oct 22, 2012

resizable is now a part of package.json, see Manifest Format, and you can also change it at runtime, see Window.setResizable in Window.

@zcbenz zcbenz closed this as completed Oct 22, 2012
@shaunbyrnes
Copy link

Hi guys

@zcbenz I have just started to try out node webkit and have been using the manifest examples. I have tried the min_width, min_height, max_width, max_height settings and they are not causing any change when running the app. I have also tried building the .exe version to see if packaging would make any difference, but that did not. The resizable setting is not working either.

The settings for width and height do work correctly.

I am not sure what I am missing here - I am on Window 7 fyi.

@zcbenz
Copy link
Contributor

zcbenz commented Oct 29, 2012

It's a bug, see #121

I'll fix in next release, thanks for reporting.

@shaunbyrnes
Copy link

@zcbenz ok cool thanks.
Next release is likely to be when?

@Mithgol
Copy link
Contributor

Mithgol commented Oct 29, 2012

It was said that new minor versions of node-webkit happen weekly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants