Electron Window and contents resize on scroll


Hey guys,
I have made a small and dead-simple electron app for Wunderlist called Wunderbar and I need some help with it. It’s basically duplicating the MacOS Wunderlist app’s quickadd function for Windows and Linux. This is my first electron app, and although I am experienced in HTML5 and CSS, I am a complete beginner in JS.

Check out the repo and play around with it. You’ll notice that it can’t resize, and to sign in to Wunderlist, you have to scroll around. I did this on purpose: the webview has negative padding so as to hide the toolbar and top bar on the webapp. But here’s the problem. I want to make it so that when I scroll down within the window bounds, the window resizes to show the toolbars and the tasks below the input box. When I scroll up, I want it to collapse back into the toolbar size. If this doesn’t work, a double-click or hotkey will do.

As I said before, I have a very limited knowledge of JS, and if any of you have any ideas or solutions, make a pull request here or post the complete code below.

Thanks, and sorry for my ignorance.