1
0
Fork 0
mirror of https://github.com/Zedfrigg/ironbar.git synced 2025-07-01 02:31:04 +02:00

feat: wrap modules in a revealer to support animated show/hide

Resolves #72.
This commit is contained in:
Jake Stanger 2023-04-22 14:49:15 +01:00
parent 1855416db4
commit 83f44fd92f
No known key found for this signature in database
GPG key ID: C51FC8F9CB0BEA61
5 changed files with 83 additions and 19 deletions

View file

@ -190,11 +190,13 @@ fn add_modules(
let popup = Popup::new(info, popup_gap);
let popup = Arc::new(RwLock::new(popup));
let orientation = info.bar_position.get_orientation();
macro_rules! add_module {
($module:expr, $id:expr) => {{
let common = $module.common.take().expect("Common config did not exist");
let widget = create_module(*$module, $id, &info, &Arc::clone(&popup))?;
let container = wrap_widget(&widget, common);
let container = wrap_widget(&widget, common, orientation);
content.add(&container);
}};
}