dash-frontend: tabs, other fixes (desc)
- set rustfmt line width to 120 columns by default for wgui - dashboard tabs - wgui: `remove_children`
This commit is contained in:
31
dash-frontend/src/tab/monado.rs
Normal file
31
dash-frontend/src/tab/monado.rs
Normal file
@@ -0,0 +1,31 @@
|
||||
use wgui::parser::{ParseDocumentParams, ParserState};
|
||||
|
||||
use crate::tab::{Tab, TabParams, TabType};
|
||||
|
||||
pub struct TabMonado {
|
||||
#[allow(dead_code)]
|
||||
pub state: ParserState,
|
||||
}
|
||||
|
||||
impl Tab for TabMonado {
|
||||
fn get_type(&self) -> TabType {
|
||||
TabType::Games
|
||||
}
|
||||
}
|
||||
|
||||
impl TabMonado {
|
||||
pub fn new(params: TabParams) -> anyhow::Result<Self> {
|
||||
let state = wgui::parser::parse_from_assets(
|
||||
&ParseDocumentParams {
|
||||
globals: params.globals.clone(),
|
||||
path: "gui/tab/monado.xml",
|
||||
extra: Default::default(),
|
||||
},
|
||||
params.layout,
|
||||
params.listeners,
|
||||
params.parent_id,
|
||||
)?;
|
||||
|
||||
Ok(Self { state })
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user