@@ -965,7 +965,8 @@ impl DemoApp {
965965 pub fn new ( cx : & CreationContext ) -> Self {
966966 egui_extras:: install_image_loaders ( & cx. egui_ctx ) ;
967967
968- cx. egui_ctx . style_mut ( |style| style. animation_time *= 10.0 ) ;
968+ cx. egui_ctx
969+ . global_style_mut ( |style| style. animation_time *= 10.0 ) ;
969970
970971 let snarl = cx. storage . map_or_else ( Snarl :: new, |storage| {
971972 storage
@@ -988,16 +989,16 @@ impl DemoApp {
988989}
989990
990991impl App for DemoApp {
991- fn update ( & mut self , ctx : & egui:: Context , _frame : & mut eframe:: Frame ) {
992- egui:: TopBottomPanel :: top ( "top_panel" ) . show ( ctx , |ui| {
992+ fn ui ( & mut self , ui : & mut egui:: Ui , _frame : & mut eframe:: Frame ) {
993+ egui:: Panel :: top ( "top_panel" ) . show_inside ( ui , |ui| {
993994 // The top panel is often a good place for a menu bar:
994995
995996 egui:: MenuBar :: new ( ) . ui ( ui, |ui| {
996997 #[ cfg( not( target_arch = "wasm32" ) ) ]
997998 {
998999 ui. menu_button ( "File" , |ui| {
9991000 if ui. button ( "Quit" ) . clicked ( ) {
1000- ctx . send_viewport_cmd ( egui:: ViewportCommand :: Close ) ;
1001+ ui . send_viewport_cmd ( egui:: ViewportCommand :: Close ) ;
10011002 }
10021003 } ) ;
10031004 ui. add_space ( 16.0 ) ;
@@ -1011,13 +1012,13 @@ impl App for DemoApp {
10111012 } ) ;
10121013 } ) ;
10131014
1014- egui:: SidePanel :: left ( "style" ) . show ( ctx , |ui| {
1015+ egui:: Panel :: left ( "style" ) . show_inside ( ui , |ui| {
10151016 egui:: ScrollArea :: vertical ( ) . show ( ui, |ui| {
10161017 egui_probe:: Probe :: new ( & mut self . style ) . show ( ui) ;
10171018 } ) ;
10181019 } ) ;
10191020
1020- egui:: SidePanel :: right ( "selected-list" ) . show ( ctx , |ui| {
1021+ egui:: Panel :: right ( "selected-list" ) . show_inside ( ui , |ui| {
10211022 egui:: ScrollArea :: vertical ( ) . show ( ui, |ui| {
10221023 ui. strong ( "Selected nodes" ) ;
10231024
@@ -1049,7 +1050,7 @@ impl App for DemoApp {
10491050 } ) ;
10501051 } ) ;
10511052
1052- egui:: CentralPanel :: default ( ) . show ( ctx , |ui| {
1053+ egui:: CentralPanel :: default ( ) . show_inside ( ui , |ui| {
10531054 SnarlWidget :: new ( )
10541055 . id ( Id :: new ( "snarl-demo" ) )
10551056 . style ( self . style )
0 commit comments