feat: add scrolled window for available networks
This commit is contained in:
parent
045f3976a5
commit
fca6150c3b
1 changed files with 9 additions and 1 deletions
|
|
@ -23,6 +23,13 @@ pub fn add_available_wifi(target: >k4::Box, separator: Separator) {
|
|||
eprintln!("scan_for_wifi failed: {}", err);
|
||||
}
|
||||
});
|
||||
|
||||
let scrolled_window = gtk4::ScrolledWindow::new();
|
||||
scrolled_window.set_hscrollbar_policy(gtk4::PolicyType::Never);
|
||||
scrolled_window.set_vscrollbar_policy(gtk4::PolicyType::Automatic);
|
||||
scrolled_window.set_propagate_natural_height(true);
|
||||
scrolled_window.set_max_content_height(300);
|
||||
|
||||
let wifi_list = ListBox::new();
|
||||
rx.attach(
|
||||
None,
|
||||
|
|
@ -32,7 +39,8 @@ pub fn add_available_wifi(target: >k4::Box, separator: Separator) {
|
|||
Continue(true)
|
||||
}),
|
||||
);
|
||||
target.append(&wifi_list);
|
||||
scrolled_window.set_child(Some(&wifi_list));
|
||||
target.append(&scrolled_window);
|
||||
}
|
||||
|
||||
fn build_aps_list(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue