Basic UI work
This commit is contained in:
parent
ba677af0f4
commit
9ed29eab94
6 changed files with 77 additions and 7 deletions
27
applets/cosmic-applet-network/src/ui/toggles.rs
Normal file
27
applets/cosmic-applet-network/src/ui/toggles.rs
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
use gtk4::{prelude::*, Align, Label, Orientation, Separator, Switch};
|
||||
|
||||
pub fn add_toggles(target: >k4::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));
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue