test update

This commit is contained in:
Hellx2 2024-08-12 20:45:40 +10:00
parent c9f3126997
commit 601319addf
2 changed files with 29 additions and 1 deletions

View file

@ -78,9 +78,34 @@ pub fn available_list() -> ScrolledWindow {
.width_request(300)
.height_request(600)
.halign(Align::End)
.build();
// A search bar for the drivers.
let drivers_search = SearchBar::builder()
.halign(Align::Fill)
.valign(Align::Start)
.css_classes(["search-bar"])
.build();
let drivers_entry = SearchEntry::builder()
.css_classes(["entries"])
.halign(Align::Center)
.valign(Align::Start)
.width_request(600)
.placeholder_text("Search for a driver...")
.sensitive(true)
.hexpand(true)
.build();
let list_box = gtk::Box::builder()
.orientation(Orientation::Vertical)
.css_classes(["available_list"])
.build();
list_box.append(&drivers_search);
list_box.append(&drivers_entry);
list_box.append(&scrollable);
scrollable
}

View file

@ -125,7 +125,10 @@ fn show_package(pkg: String) {
*/
let description = info
.split_once("Description")
.unwrap()
.unwrap_or_else(|| {
println!("{}", info);
("", info)
})
.1
.split_once(":")
.unwrap()