👷 add more ids for styling
This commit is contained in:
parent
6c1fd2b120
commit
245c9ef2ae
|
@ -55,7 +55,10 @@ impl ApplicationBrowser {
|
|||
let app_browser_box = gtk::Box::new(gtk::Orientation::Vertical, 0);
|
||||
app_browser_box.set_expand(true);
|
||||
|
||||
let child_name = "appBrowserpage";
|
||||
|
||||
let button_box = gtk::Box::new(gtk::Orientation::Horizontal, 10);
|
||||
button_box.set_widget_name(child_name);
|
||||
let advanced_button = gtk::ToggleButton::with_label("advanced");
|
||||
advanced_button.set_tooltip_text(Some("Toggle an extended selection of packages"));
|
||||
advanced_button.connect_clicked(on_advanced_clicked);
|
||||
|
|
|
@ -252,7 +252,11 @@ fn build_ui(application: >k::Application) {
|
|||
stack.set_visible_child_name(&format!("{name}page"));
|
||||
}));
|
||||
|
||||
let child_name =
|
||||
format!("{}page", page.unwrap().path().file_name().unwrap().to_str().unwrap());
|
||||
|
||||
let grid = gtk::Grid::new();
|
||||
grid.set_widget_name(&child_name);
|
||||
grid.attach(&back_btn, 0, 1, 1, 1);
|
||||
grid.attach(&label, 1, 2, 1, 1);
|
||||
viewport.add(&grid);
|
||||
|
@ -260,8 +264,6 @@ fn build_ui(application: >k::Application) {
|
|||
scrolled_window.show_all();
|
||||
|
||||
let stack: gtk::Stack = builder.object("stack").unwrap();
|
||||
let child_name =
|
||||
format!("{}page", page.unwrap().path().file_name().unwrap().to_str().unwrap());
|
||||
stack.add_named(&scrolled_window, &child_name);
|
||||
}
|
||||
|
||||
|
|
|
@ -296,6 +296,13 @@ pub fn create_tweaks_page(builder: &Builder) {
|
|||
let fixes_section_box = create_fixes_section();
|
||||
let apps_section_box_opt = create_apps_section();
|
||||
|
||||
let child_name = "tweaksBrowserpage";
|
||||
options_section_box.set_widget_name(&format!("{child_name}_options"));
|
||||
fixes_section_box.set_widget_name(&format!("{child_name}_fixes"));
|
||||
if apps_section_box_opt.is_some() {
|
||||
apps_section_box_opt.as_ref().unwrap().set_widget_name(&format!("{child_name}_apps"));
|
||||
}
|
||||
|
||||
let grid = gtk::Grid::new();
|
||||
grid.set_hexpand(true);
|
||||
grid.set_margin_start(10);
|
||||
|
@ -304,6 +311,7 @@ pub fn create_tweaks_page(builder: &Builder) {
|
|||
grid.set_margin_bottom(5);
|
||||
grid.attach(&back_btn, 0, 1, 1, 1);
|
||||
let box_collection = gtk::Box::new(gtk::Orientation::Vertical, 5);
|
||||
box_collection.set_widget_name(child_name);
|
||||
|
||||
box_collection.pack_start(&options_section_box, false, false, 10);
|
||||
box_collection.pack_start(&fixes_section_box, false, false, 10);
|
||||
|
@ -319,7 +327,6 @@ pub fn create_tweaks_page(builder: &Builder) {
|
|||
viewport.show_all();
|
||||
|
||||
let stack: gtk::Stack = builder.object("stack").unwrap();
|
||||
let child_name = "tweaksBrowserpage";
|
||||
stack.add_named(&viewport, child_name);
|
||||
}
|
||||
|
||||
|
|
12
ui/style.css
12
ui/style.css
|
@ -3,6 +3,18 @@ window {
|
|||
border-bottom-right-radius: 7px;
|
||||
}
|
||||
|
||||
#tweaksBrowserpage button {
|
||||
padding: 5px 15px;
|
||||
border: none;
|
||||
border-radius: 5px 5px 5px 5px;
|
||||
}
|
||||
|
||||
#appBrowserpage button {
|
||||
padding: 5px 20px;
|
||||
border: none;
|
||||
border-radius: 5px 5px 5px 5px;
|
||||
}
|
||||
|
||||
.homepage button {
|
||||
transition: border 100ms ease-in-out;
|
||||
padding: 10px 30px;
|
||||
|
|
Loading…
Reference in New Issue