File tree Expand file tree Collapse file tree 1 file changed +7
-15
lines changed Expand file tree Collapse file tree 1 file changed +7
-15
lines changed Original file line number Diff line number Diff line change @@ -45,21 +45,13 @@ fn build_ui(application: >k::Application) {
4545 // The gtk::ListBoxRow can contain any possible widgets.
4646
4747 let listbox = gtk:: ListBox :: new ( ) ;
48- listbox. bind_model (
49- Some ( & model) ,
50- clone ! (
51- #[ weak]
52- window,
53- #[ upgrade_or_panic]
54- move |item| {
55- ListBoxRow :: new(
56- item. downcast_ref:: <RowData >( )
57- . expect( "RowData is of wrong type" ) ,
58- )
59- . upcast:: <gtk:: Widget >( )
60- }
61- ) ,
62- ) ;
48+ listbox. bind_model ( Some ( & model) , move |item| {
49+ ListBoxRow :: new (
50+ item. downcast_ref :: < RowData > ( )
51+ . expect ( "RowData is of wrong type" ) ,
52+ )
53+ . upcast :: < gtk:: Widget > ( )
54+ } ) ;
6355
6456 let scrolled_window = gtk:: ScrolledWindow :: builder ( )
6557 . hscrollbar_policy ( gtk:: PolicyType :: Never ) // Disable horizontal scrolling
You can’t perform that action at this time.
0 commit comments