Reputation: 516
Before minimizing the node-webkit window it looked like this:
After restoring the node-webkit window it looked like this:
package.json
{
"name": "Gallay",
"description": "Simplified Billing",
"version": "0.1",
"main": "index.html",
"window": {
"icon": "icons/16.png",
"show": true,
"toolbar": false,
"frame": true,
"position": "center",
"width": 507,
"height": 570,
"min_width": 507,
"min_height": 570,
"max_width": 507,
"max_height": 570
}
}
I need fixed width while minimizing and restoring the node-webkit window. How can I solve the above problem?
Upvotes: 2
Views: 2087
Reputation: 1
Add to package.json: "resizable": false
and remove min_width
, min_height
, max_width
, max_height
.
Upvotes: 0
Reputation: 516
After including jQuery and the following JavaScript, the problem can be solved.
$(document).ready(function(){
$(window).resize(function(){
window.resizeTo(507,570);
window.focus();
});
});
Upvotes: 1