mirror of
https://github.com/rad4day/Waybar.git
synced 2025-07-18 00:42:46 +02:00
feat: add module
class to the root elements of the modules
Previously, the only way to select all the module labels was with the following kind of selector: ```css .modules-left > widget > label, .modules-center > widget > label, .modules-right > widget > label { /* ... */ } ``` (and a matching block for the `box` containers). Now, this can be expressed as ```css label.module, box.module { /* ... */ } ```
This commit is contained in:
@@ -20,6 +20,7 @@ ALabel::ALabel(const Json::Value& config, const std::string& name, const std::st
|
||||
if (!id.empty()) {
|
||||
label_.get_style_context()->add_class(id);
|
||||
}
|
||||
label_.get_style_context()->add_class(MODULE_CLASS);
|
||||
event_box_.add(label_);
|
||||
if (config_["max-length"].isUInt()) {
|
||||
label_.set_max_width_chars(config_["max-length"].asInt());
|
||||
|
Reference in New Issue
Block a user