@@ -35,6 +35,7 @@ use crate::translations::translations_2::{
3535 only_show_favorites_translation, showing_results_translation,
3636} ;
3737use crate :: translations:: translations_5:: { only_show_blacklisted_translation, program_translation} ;
38+ use crate :: utils:: formatted_strings:: clip_text;
3839use crate :: utils:: types:: icon:: Icon ;
3940use crate :: { Language , RunningPage , Sniffer , StyleType } ;
4041
@@ -261,16 +262,9 @@ fn row_report_entry<'a>(
261262 let max_chars = report_col. get_max_chars ( None ) ;
262263 let col_value = report_col. get_value ( key, val, data_repr) ;
263264 ret_val = ret_val. push (
264- Container :: new (
265- Text :: new ( if col_value. len ( ) <= max_chars {
266- col_value
267- } else {
268- [ & col_value[ ..max_chars - 2 ] , "…" ] . concat ( )
269- } )
270- . class ( text_type) ,
271- )
272- . align_x ( Alignment :: Center )
273- . width ( report_col. get_width ( ) ) ,
265+ Container :: new ( Text :: new ( clip_text ( & col_value, max_chars) ) . class ( text_type) )
266+ . align_x ( Alignment :: Center )
267+ . width ( report_col. get_width ( ) ) ,
274268 ) ;
275269 }
276270 ret_val
@@ -412,7 +406,7 @@ fn filter_input<'a>(
412406
413407 let mut input = TextInput :: new ( "" , filter_value)
414408 . on_input ( move |new_value| {
415- Message :: Search ( filter_input_type. new_search ( & search_params, new_value) )
409+ Message :: Search ( filter_input_type. new_search ( & search_params, & new_value) )
416410 } )
417411 . padding ( [ 2 , 5 ] )
418412 . size ( FONT_SIZE_FOOTER )
@@ -462,8 +456,9 @@ fn filter_combobox(
462456
463457 let button_clear = button_clear_filter ( filter_input_type. clear_search ( & search_params) ) ;
464458
465- let update_fn =
466- move |new_value| Message :: Search ( filter_input_type. new_search ( & search_params, new_value) ) ;
459+ let update_fn = move |new_value : String | {
460+ Message :: Search ( filter_input_type. new_search ( & search_params, & new_value) )
461+ } ;
467462
468463 let mut combobox = ComboBox :: new ( combo_box_state, "" , Some ( & filter_value) , update_fn. clone ( ) )
469464 . on_input ( update_fn)
0 commit comments