Minimum screen size

1 view
Skip to first unread message

Scott Mebberson

unread,
Mar 20, 2014, 6:44:48 AM3/20/14
to node-...@googlegroups.com
Hi,

I'm wondering if anyone knows if there is a minimum window size for node-webkit. I've run into something odd.

The screen size I require for a popup window (note, not the main application window) is 66px high. When the window appears it is 66px high. From here on in, things change depending on the value of 'frame' when opening the window. When you click and move the window:

if frame is true; the window resizes (height only) to a certain height, but incorporates the size of the frame
if frame is false; the window resizes (height only) to a certain height, and doesn't incorporate the size of the frame

So I'm pretty sure the height of the window is always the same, but includes the frame and one doesn't.

Has anyone else experienced this?

cheers,
Scott.

Laszlo Z. Antal

unread,
Mar 20, 2014, 10:47:25 AM3/20/14
to node-...@googlegroups.com
Hi,
I had this when implemented grunt like notifications and what caused it is the minimum height set in my main package.json file. Once I passed my custom values into window.open it worked as expected.
Try that see if that fixes your issue as well. 

Hope it helps

Laszlo

--
You received this message because you are subscribed to the Google Groups "node-webkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-webkit...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Scott Mebberson

unread,
Mar 20, 2014, 5:46:15 PM3/20/14
to node-...@googlegroups.com
Hi Laszlo,

Thanks for your help.

I had a look at this. I do have a minimum height set in my package.json file, but the value is much larger than what the popup window is resizing too.

I did remove it, but the small popup window still resizes on drag.

win = gui.Window.open((typeof process !== 'object') ? 'mini-timer.html' : 'app://focusboosterdesktop/mini-timer.html', {
frame: true,
toolbar: false,
'always-on-top': true,
position: 'center',
width: 150,
height: 66,
show: true,
focus: true,
resizable: false
});

That's my window open code. Has anyone else found this minimum?

cheers,
Scott.

LZAntal

unread,
Mar 20, 2014, 7:17:47 PM3/20/14
to node-...@googlegroups.com
Hi,

Just tried your open code and and it works as expected on my machine. Mac, NW 0.9
Is there any resize function in the mini-timer.html file? Try creating a totally empty html file and see if it happens there too.

Scott Mebberson

unread,
Mar 20, 2014, 7:26:04 PM3/20/14
to node-...@googlegroups.com
Hi Laszlo,

Thank you for trying that out. A good suggestion too. I tried a blank file and it's working fine.

I guess is it something in my HTML or CSS. It's definitely not my javascript as I've pulled that to pieces trying to find out the cause.

I'll slowly add things back until I find the cause. I'll post back.

Thanks again!

cheers,
Scott.

Scott Mebberson

unread,
Mar 20, 2014, 7:37:35 PM3/20/14
to node-...@googlegroups.com
Hi Laszlo,

Thanks for that push in the right direction, again!

It did turn out to be my JavaScript. I was issuing window.moveBy commands to the browsers window object, not node-webkit's version.

Did you think I should log this as a bug. Seems strange that it would change the browser height?

cheers,
Scott.

LZAntal

unread,
Mar 20, 2014, 7:43:21 PM3/20/14
to node-...@googlegroups.com
Hi,


Awesome! Glad it worked :))
What I do is store the NW window in win variable so I avoid using the wrong one. I can't tell you how many times I did what you did ;)
Well thats a good question. I don't think it would hurt to open a bug for it. People more intimate about the window object could tell right away if it's an expected behavior or not. 

VoidVolker

unread,
Mar 21, 2014, 2:31:02 AM3/21/14
to node-...@googlegroups.com
You want to create some popup window for application? Try to look to my example with hint: https://mega.co.nz/#!wZkjXb6a!RTa4xyI87CmBBUsFaJn6VXHMLnMqT35k532OjSWjXCM
Reply all
Reply to author
Forward
0 new messages