slide up splash screen
This commit is contained in:
		
							parent
							
								
									37ef2d3e6a
								
							
						
					
					
						commit
						4cd5c8a6b3
					
				
					 1 changed files with 29 additions and 27 deletions
				
			
		|  | @ -35,7 +35,7 @@ namespace Webpin { | |||
|         private GLib.DesktopAppInfo info; | ||||
|         private DesktopFile file; | ||||
|         private WebKit.CookieManager cookie_manager; | ||||
|         private Gtk.Box container; //the spinner container | ||||
|         private Gtk.Box container; | ||||
|         Granite.Widgets.Toast app_notification; | ||||
| 
 | ||||
|         public signal void external_request (WebKit.NavigationAction action); | ||||
|  | @ -80,10 +80,12 @@ namespace Webpin { | |||
|             //overlay trick to make snapshot work even with the spinner | ||||
|             var overlay = new Gtk.Overlay (); | ||||
|             overlay.add (app_view); | ||||
|             overlay.add_overlay (container); | ||||
|             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) => { | ||||
|                 print("external request"); | ||||
|  | @ -160,6 +162,8 @@ namespace Webpin { | |||
|             } catch (Error e) { | ||||
|                 warning (e.message); | ||||
|             } | ||||
| 
 | ||||
|             if (snap != null) { | ||||
|                 // data ist in BGRA apparently (according to testing). Docs said ARGB, but that | ||||
|                 // appears not to be the case | ||||
|                 unowned uint8[] data = snap.get_data (); | ||||
|  | @ -185,10 +189,8 @@ namespace Webpin { | |||
|                     if (file != null) | ||||
|                         file.edit_propertie ("WebpinThemeColor", ui_color); | ||||
|                 } | ||||
|             if(container.visible) { | ||||
|                 container.visible = false; | ||||
|             } | ||||
| 
 | ||||
|             visible_child_name = "app"; | ||||
|             request_finished (); | ||||
| 	    } | ||||
|     } | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Artem Anufrij
						Artem Anufrij