Merge pull request #2916 from alttabber/master
Add style classes for hyprland/submap
This commit is contained in:
commit
28cd9dff47
|
@ -80,3 +80,4 @@ Addressed by *hyprland/submap*
|
||||||
# STYLE
|
# STYLE
|
||||||
|
|
||||||
- *#submap*
|
- *#submap*
|
||||||
|
- *#submap.<name>*
|
||||||
|
|
|
@ -54,8 +54,16 @@ void Submap::onEvent(const std::string& ev) {
|
||||||
auto submapName = ev.substr(ev.find_last_of('>') + 1);
|
auto submapName = ev.substr(ev.find_last_of('>') + 1);
|
||||||
submapName = waybar::util::sanitize_string(submapName);
|
submapName = waybar::util::sanitize_string(submapName);
|
||||||
|
|
||||||
|
if (!submap_.empty()){
|
||||||
|
label_.get_style_context()->remove_class(submap_);
|
||||||
|
}
|
||||||
|
|
||||||
submap_ = submapName;
|
submap_ = submapName;
|
||||||
|
|
||||||
|
label_.get_style_context()->add_class(submap_);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
spdlog::debug("hyprland submap onevent with {}", submap_);
|
spdlog::debug("hyprland submap onevent with {}", submap_);
|
||||||
|
|
||||||
dp.emit();
|
dp.emit();
|
||||||
|
|
Loading…
Reference in New Issue