Basic UI work

This commit is contained in:
Lucy 2022-02-01 16:46:25 -05:00
parent ba677af0f4
commit 9ed29eab94
No known key found for this signature in database
GPG key ID: EBC517FAD666BBF1
6 changed files with 77 additions and 7 deletions

View file

@ -0,0 +1,27 @@
use gtk4::{prelude::*, Align, Label, Orientation, Separator, Switch};
pub fn add_toggles(target: &gtk4::Box) {
view! {
airplane_mode_box = gtk4::Box {
append: airplane_mode_label = &Label {
set_markup: "<b>Airplane Mode</b>",
set_halign: Align::Start
},
append: airplane_mode_switch = &Switch {}
}
}
view! {
wifi_box = gtk4::Box {
append: wifi_label = &Label {
set_markup: "<b>WiFi</b>",
set_halign: Align::Start
},
append: wifi_switch = &Switch {}
}
}
target.append(&airplane_mode_box);
target.append(&Separator::new(Orientation::Horizontal));
target.append(&wifi_box);
target.append(&Separator::new(Orientation::Horizontal));
}