slide up splash screen

This commit is contained in:
Artem Anufrij 2017-08-11 20:44:00 +02:00
parent 37ef2d3e6a
commit 4cd5c8a6b3

View file

@ -35,7 +35,7 @@ namespace Webpin {
private GLib.DesktopAppInfo info; private GLib.DesktopAppInfo info;
private DesktopFile file; private DesktopFile file;
private WebKit.CookieManager cookie_manager; private WebKit.CookieManager cookie_manager;
private Gtk.Box container; //the spinner container private Gtk.Box container;
Granite.Widgets.Toast app_notification; Granite.Widgets.Toast app_notification;
public signal void external_request (WebKit.NavigationAction action); public signal void external_request (WebKit.NavigationAction action);
@ -80,10 +80,12 @@ namespace Webpin {
//overlay trick to make snapshot work even with the spinner //overlay trick to make snapshot work even with the spinner
var overlay = new Gtk.Overlay (); var overlay = new Gtk.Overlay ();
overlay.add (app_view); overlay.add (app_view);
overlay.add_overlay (container);
overlay.add_overlay (app_notification); overlay.add_overlay (app_notification);
add (overlay); add_named (container, "splash");
add_named (overlay, "app");
transition_type = Gtk.StackTransitionType.SLIDE_UP;
app_view.create.connect ((action) => { app_view.create.connect ((action) => {
print("external request"); print("external request");
@ -160,6 +162,8 @@ namespace Webpin {
} catch (Error e) { } catch (Error e) {
warning (e.message); warning (e.message);
} }
if (snap != null) {
// data ist in BGRA apparently (according to testing). Docs said ARGB, but that // data ist in BGRA apparently (according to testing). Docs said ARGB, but that
// appears not to be the case // appears not to be the case
unowned uint8[] data = snap.get_data (); unowned uint8[] data = snap.get_data ();
@ -185,10 +189,8 @@ namespace Webpin {
if (file != null) if (file != null)
file.edit_propertie ("WebpinThemeColor", ui_color); file.edit_propertie ("WebpinThemeColor", ui_color);
} }
if(container.visible) {
container.visible = false;
} }
visible_child_name = "app";
request_finished (); request_finished ();
} }
} }