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) {
45
45
// The gtk::ListBoxRow can contain any possible widgets.
46
46
47
47
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
+ } ) ;
63
55
64
56
let scrolled_window = gtk:: ScrolledWindow :: builder ( )
65
57
. hscrollbar_policy ( gtk:: PolicyType :: Never ) // Disable horizontal scrolling
You can’t perform that action at this time.
0 commit comments