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

feat: add widget and widget-container css classes on all widgets

This commit is contained in:
Jake Stanger 2023-09-05 22:37:58 +01:00
parent 5bc7b7f317
commit 60bb69feec
No known key found for this signature in database
GPG key ID: C51FC8F9CB0BEA61
2 changed files with 15 additions and 10 deletions

View file

@ -206,7 +206,8 @@ where
let instance_name = name.unwrap_or_else(|| module_name.to_string());
let module_parts = module.into_widget(context, info)?;
module_parts.widget.style_context().add_class(module_name);
module_parts.widget.add_class("widget");
module_parts.widget.add_class(module_name);
let has_popup = if let Some(popup_content) = module_parts.popup.clone() {
popup_content
@ -376,6 +377,8 @@ pub fn wrap_widget<W: IsA<Widget>>(
revealer.set_reveal_child(true);
let container = EventBox::new();
container.add_class("widget-container");
container.add_events(EventMask::SCROLL_MASK);
container.add(&revealer);