@@ -199,7 +199,7 @@ impl SidePanel {
199
199
let mut is_resizing = false ;
200
200
if resizable {
201
201
let resize_id = id. with ( "__resize" ) ;
202
- if let Some ( pointer) = ui. input ( ) . pointer . latest_pos ( ) {
202
+ if let Some ( pointer) = ui. ctx ( ) . latest_pointer_pos ( ) {
203
203
let we_are_on_top = ui
204
204
. ctx ( )
205
205
. layer_id_at ( pointer)
@@ -284,7 +284,7 @@ impl SidePanel {
284
284
/// Show the panel at the top level.
285
285
pub fn show < R > (
286
286
self ,
287
- ctx : & CtxRef ,
287
+ ctx : & Context ,
288
288
add_contents : impl FnOnce ( & mut Ui ) -> R ,
289
289
) -> InnerResponse < R > {
290
290
self . show_dyn ( ctx, Box :: new ( add_contents) )
@@ -293,7 +293,7 @@ impl SidePanel {
293
293
/// Show the panel at the top level.
294
294
fn show_dyn < ' c , R > (
295
295
self ,
296
- ctx : & CtxRef ,
296
+ ctx : & Context ,
297
297
add_contents : Box < dyn FnOnce ( & mut Ui ) -> R + ' c > ,
298
298
) -> InnerResponse < R > {
299
299
let layer_id = LayerId :: background ( ) ;
@@ -485,7 +485,8 @@ impl TopBottomPanel {
485
485
let mut is_resizing = false ;
486
486
if resizable {
487
487
let resize_id = id. with ( "__resize" ) ;
488
- if let Some ( pointer) = ui. input ( ) . pointer . latest_pos ( ) {
488
+ let latest_pos = ui. input ( ) . pointer . latest_pos ( ) ;
489
+ if let Some ( pointer) = latest_pos {
489
490
let we_are_on_top = ui
490
491
. ctx ( )
491
492
. layer_id_at ( pointer)
@@ -570,7 +571,7 @@ impl TopBottomPanel {
570
571
/// Show the panel at the top level.
571
572
pub fn show < R > (
572
573
self ,
573
- ctx : & CtxRef ,
574
+ ctx : & Context ,
574
575
add_contents : impl FnOnce ( & mut Ui ) -> R ,
575
576
) -> InnerResponse < R > {
576
577
self . show_dyn ( ctx, Box :: new ( add_contents) )
@@ -579,7 +580,7 @@ impl TopBottomPanel {
579
580
/// Show the panel at the top level.
580
581
fn show_dyn < ' c , R > (
581
582
self ,
582
- ctx : & CtxRef ,
583
+ ctx : & Context ,
583
584
add_contents : Box < dyn FnOnce ( & mut Ui ) -> R + ' c > ,
584
585
) -> InnerResponse < R > {
585
586
let layer_id = LayerId :: background ( ) ;
@@ -670,7 +671,7 @@ impl CentralPanel {
670
671
/// Show the panel at the top level.
671
672
pub fn show < R > (
672
673
self ,
673
- ctx : & CtxRef ,
674
+ ctx : & Context ,
674
675
add_contents : impl FnOnce ( & mut Ui ) -> R ,
675
676
) -> InnerResponse < R > {
676
677
self . show_dyn ( ctx, Box :: new ( add_contents) )
@@ -679,7 +680,7 @@ impl CentralPanel {
679
680
/// Show the panel at the top level.
680
681
fn show_dyn < ' c , R > (
681
682
self ,
682
- ctx : & CtxRef ,
683
+ ctx : & Context ,
683
684
add_contents : Box < dyn FnOnce ( & mut Ui ) -> R + ' c > ,
684
685
) -> InnerResponse < R > {
685
686
let available_rect = ctx. available_rect ( ) ;
0 commit comments