Webview example - can't resize window correctly
I just walked through the example here:
https://developer.gnome.org/gnome-devel-demos/stable/hellognome.js.html.en
The application runs ok, however the window itself can't be resized properly. You can grab any edge and grow it but then you can't shrink the window. If you drag far enough (in a "shrink" direction) the window will jump around the screen.
Additionally, if you maximize the window, the restore button disappears from the title bar. Then you can only minimize or close the window.
I played around with another webview browser example which worked ok. In that example, the webview is in a child container.
To fix the hellognome example, I changed it to:
// Create a scrolled window to embed the WebView
// (Without this container the gnome window can't be resized properly)
const scrolledWindow = new Gtk.ScrolledWindow ({
hscrollbar_policy: Gtk.PolicyType.AUTOMATIC,
vscrollbar_policy: Gtk.PolicyType.AUTOMATIC
});
scrolledWindow.add(this._webView);
// Put the scrolled window into the app window
this._window.add(scrolledWindow);
I'm running Ubuntu 18.04