css
This commit is contained in:
parent
1dfd02c063
commit
bfab2d53a8
@ -19,3 +19,17 @@
|
|||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.round-border-only-top {
|
||||||
|
border-top-right-radius: 15px;
|
||||||
|
border-top-left-radius: 15px;
|
||||||
|
border-bottom-right-radius 0=px;
|
||||||
|
border-bottom-left-radius 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.round-border-only-bottom {
|
||||||
|
border-top-right-radius: 0px;
|
||||||
|
border-top-left-radius: 0px;
|
||||||
|
border-bottom-right-radius 15px;
|
||||||
|
border-bottom-left-radius 15px;
|
||||||
|
}
|
@ -42,6 +42,7 @@ pub fn content() -> gtk::Box {
|
|||||||
.build();
|
.build();
|
||||||
|
|
||||||
let kernel_branch_expander_row = adw::ExpanderRow::builder()
|
let kernel_branch_expander_row = adw::ExpanderRow::builder()
|
||||||
|
.subtitle("Kernel Branch")
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
kernel_branch_expander_row.add_row(&kernel_branch_expandable(&kernel_branch_expander_row));
|
kernel_branch_expander_row.add_row(&kernel_branch_expandable(&kernel_branch_expander_row));
|
||||||
@ -72,11 +73,11 @@ fn kernel_branch_expandable(expander_row: &adw::ExpanderRow) -> gtk::ListBox {
|
|||||||
let searchbar = gtk::SearchEntry::builder()
|
let searchbar = gtk::SearchEntry::builder()
|
||||||
.search_delay(500)
|
.search_delay(500)
|
||||||
.build();
|
.build();
|
||||||
|
searchbar.add_css_class("round-border-only-top");
|
||||||
|
|
||||||
let boxedlist = gtk::ListBox::builder()
|
let boxedlist = gtk::ListBox::builder()
|
||||||
.selection_mode(SelectionMode::None)
|
.selection_mode(SelectionMode::None)
|
||||||
.build();
|
.build();
|
||||||
boxedlist.add_css_class("boxedlist");
|
|
||||||
|
|
||||||
boxedlist.append(&searchbar);
|
boxedlist.append(&searchbar);
|
||||||
|
|
||||||
@ -113,8 +114,11 @@ fn kernel_branch_expandable(expander_row: &adw::ExpanderRow) -> gtk::ListBox {
|
|||||||
|
|
||||||
let branch_container_viewport = gtk::ScrolledWindow::builder()
|
let branch_container_viewport = gtk::ScrolledWindow::builder()
|
||||||
.child(&branch_container)
|
.child(&branch_container)
|
||||||
|
.hscrollbar_policy(PolicyType::Never)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
|
branch_container.add_css_class("round-border-only-bottom");
|
||||||
|
|
||||||
boxedlist.append(&branch_container_viewport);
|
boxedlist.append(&branch_container_viewport);
|
||||||
|
|
||||||
searchbar.connect_search_changed(clone!(@weak searchbar, @weak branch_container => move |_| {
|
searchbar.connect_search_changed(clone!(@weak searchbar, @weak branch_container => move |_| {
|
||||||
@ -198,7 +202,12 @@ fn get_kernel_branches() -> Vec<KernelBranch> {
|
|||||||
db: "https://raw.githubusercontent.com/CosmicFusion/fedora-kernel-manager/main/data/db-kernel-cachy.json".to_string()
|
db: "https://raw.githubusercontent.com/CosmicFusion/fedora-kernel-manager/main/data/db-kernel-cachy.json".to_string()
|
||||||
};
|
};
|
||||||
|
|
||||||
vec![test_branch]
|
let test_branch2 = KernelBranch {
|
||||||
|
name: "kernel-cachy".to_string(),
|
||||||
|
db: "https://raw.githubusercontent.com/CosmicFusion/fedora-kernel-manager/main/data/db-kernel-cachy.json".to_string()
|
||||||
|
};
|
||||||
|
|
||||||
|
vec![test_branch, test_branch2]
|
||||||
}
|
}
|
||||||
fn get_running_kernel_info() -> RunningKernelInfo {
|
fn get_running_kernel_info() -> RunningKernelInfo {
|
||||||
let kernel = match Command::new("uname").arg("-r").stdout(Stdio::piped()).output() {
|
let kernel = match Command::new("uname").arg("-r").stdout(Stdio::piped()).output() {
|
||||||
|
Loading…
Reference in New Issue
Block a user