@@ -1072,7 +1072,7 @@ fn draw_tooltip(
10721072 ctx. select_font_face ( "Sans" , cairo:: FontSlant :: Normal , cairo:: FontWeight :: Normal ) ;
10731073 ctx. set_font_size ( 12.0 ) ;
10741074
1075- if let Ok ( ext) = ctx. text_extents ( & text) {
1075+ if let Ok ( ext) = ctx. text_extents ( text) {
10761076 let pad = 6.0 ;
10771077 let tooltip_w = ext. width ( ) + pad * 2.0 ;
10781078 let tooltip_h = ext. height ( ) + pad * 2.0 ;
@@ -1127,7 +1127,7 @@ fn draw_tooltip(
11271127 tooltip_x + pad - ext. x_bearing ( ) ,
11281128 tooltip_y + pad - ext. y_bearing ( ) ,
11291129 ) ;
1130- let _ = ctx. show_text ( & text) ;
1130+ let _ = ctx. show_text ( text) ;
11311131 }
11321132 break ;
11331133 }
@@ -2198,7 +2198,7 @@ fn draw_button(ctx: &cairo::Context, x: f64, y: f64, w: f64, h: f64, active: boo
21982198}
21992199
22002200fn draw_label_center ( ctx : & cairo:: Context , x : f64 , y : f64 , w : f64 , h : f64 , text : & str ) {
2201- if let Ok ( ext) = ctx. text_extents ( & text) {
2201+ if let Ok ( ext) = ctx. text_extents ( text) {
22022202 let tx = x + ( w - ext. width ( ) ) / 2.0 - ext. x_bearing ( ) ;
22032203 let ty = y + ( h - ext. height ( ) ) / 2.0 - ext. y_bearing ( ) ;
22042204 ctx. set_source_rgba ( 1.0 , 1.0 , 1.0 , 0.95 ) ;
@@ -2208,7 +2208,7 @@ fn draw_label_center(ctx: &cairo::Context, x: f64, y: f64, w: f64, h: f64, text:
22082208}
22092209
22102210fn draw_label_left ( ctx : & cairo:: Context , x : f64 , y : f64 , _w : f64 , h : f64 , text : & str ) {
2211- if let Ok ( ext) = ctx. text_extents ( & text) {
2211+ if let Ok ( ext) = ctx. text_extents ( text) {
22122212 let ty = y + ( h - ext. height ( ) ) / 2.0 - ext. y_bearing ( ) ;
22132213 ctx. set_source_rgba ( 1.0 , 1.0 , 1.0 , 0.95 ) ;
22142214 ctx. move_to ( x, ty) ;
0 commit comments