@@ -221,18 +221,18 @@ impl EguiApp {
221221}
222222
223223impl eframe:: App for EguiApp {
224- fn update ( & mut self , ctx : & egui:: Context , _frame : & mut eframe:: Frame ) {
225- ctx . request_repaint ( ) ;
224+ fn ui ( & mut self , ui : & mut egui:: Ui , _frame : & mut eframe:: Frame ) {
225+ ui . request_repaint ( ) ;
226226 if let Some ( app) = self . app . as_ref ( )
227227 && !app. wallet . has_seed ( ) . unwrap_or ( false )
228228 {
229- egui:: CentralPanel :: default ( ) . show ( ctx , |_ui | {
230- egui:: Window :: new ( "Set Seed" ) . show ( ctx , |ui| {
229+ egui:: CentralPanel :: default ( ) . show_inside ( ui , |ui | {
230+ egui:: Window :: new ( "Set Seed" ) . show ( ui , |ui| {
231231 self . set_seed . show ( app, ui) ;
232232 } ) ;
233233 } ) ;
234234 } else {
235- egui:: TopBottomPanel :: top ( "tabs" ) . show ( ctx , |ui| {
235+ egui:: Panel :: top ( "tabs" ) . show_inside ( ui , |ui| {
236236 ui. horizontal ( |ui| {
237237 Tab :: iter ( ) . for_each ( |tab_variant| {
238238 let tab_name = tab_variant. to_string ( ) ;
@@ -244,26 +244,29 @@ impl eframe::App for EguiApp {
244244 } )
245245 } ) ;
246246 } ) ;
247- egui:: TopBottomPanel :: bottom ( "bottom_panel" )
248- . show ( ctx, |ui| self . bottom_panel . show ( & mut self . miner , ui) ) ;
249- egui:: CentralPanel :: default ( ) . show ( ctx, |ui| match self . tab {
250- Tab :: ParentChain => {
251- self . parent_chain . show ( self . app . as_ref ( ) , ui)
252- }
253- Tab :: Coins => {
254- self . coins . show ( self . app . as_ref ( ) , ui) ;
255- }
256- Tab :: MemPoolExplorer => {
257- self . mempool_explorer . show ( self . app . as_ref ( ) , ui) ;
258- }
259- Tab :: BlockExplorer => {
260- self . block_explorer . show ( self . app . as_ref ( ) , ui) ;
261- }
262- Tab :: Withdrawals => {
263- self . withdrawals . show ( self . app . as_ref ( ) , ui) ;
264- }
265- Tab :: ConsoleLogs => {
266- self . console_logs . show ( self . app . as_ref ( ) , ui) ;
247+ egui:: Panel :: bottom ( "bottom_panel" ) . show_inside ( ui, |ui| {
248+ self . bottom_panel . show ( & mut self . miner , ui)
249+ } ) ;
250+ egui:: CentralPanel :: default ( ) . show_inside ( ui, |ui| {
251+ match self . tab {
252+ Tab :: ParentChain => {
253+ self . parent_chain . show ( self . app . as_ref ( ) , ui)
254+ }
255+ Tab :: Coins => {
256+ self . coins . show ( self . app . as_ref ( ) , ui) ;
257+ }
258+ Tab :: MemPoolExplorer => {
259+ self . mempool_explorer . show ( self . app . as_ref ( ) , ui) ;
260+ }
261+ Tab :: BlockExplorer => {
262+ self . block_explorer . show ( self . app . as_ref ( ) , ui) ;
263+ }
264+ Tab :: Withdrawals => {
265+ self . withdrawals . show ( self . app . as_ref ( ) , ui) ;
266+ }
267+ Tab :: ConsoleLogs => {
268+ self . console_logs . show ( self . app . as_ref ( ) , ui) ;
269+ }
267270 }
268271 } ) ;
269272 }
0 commit comments