mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
ROGCC: split widgets from pages
This commit is contained in:
39
rog-control-center/src/pages/system_page.rs
Normal file
39
rog-control-center/src/pages/system_page.rs
Normal file
@@ -0,0 +1,39 @@
|
||||
use crate::{
|
||||
widgets::{anime_power_group, aura_power_group, platform_profile, rog_bios_group},
|
||||
RogApp,
|
||||
};
|
||||
|
||||
impl<'a> RogApp<'a> {
|
||||
pub fn system_page(&mut self, ctx: &egui::Context) {
|
||||
let Self {
|
||||
supported,
|
||||
states,
|
||||
asus_dbus: dbus,
|
||||
..
|
||||
} = self;
|
||||
|
||||
egui::CentralPanel::default().show(ctx, |ui| {
|
||||
// The central panel the region left after adding TopPanel's and SidePanel's
|
||||
|
||||
ui.heading("Experimental application for asusd");
|
||||
ui.separator();
|
||||
|
||||
egui::ScrollArea::vertical().show(ui, |ui| {
|
||||
if supported.platform_profile.platform_profile {
|
||||
ui.group(|ui| platform_profile(states, dbus, ui));
|
||||
}
|
||||
|
||||
ui.separator();
|
||||
ui.group(|ui| rog_bios_group(supported, states, dbus, ui));
|
||||
|
||||
ui.separator();
|
||||
ui.group(|ui| aura_power_group(supported, states, dbus, ui));
|
||||
|
||||
if supported.anime_ctrl.0 {
|
||||
ui.separator();
|
||||
ui.group(|ui| anime_power_group(supported, states, dbus, ui));
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user