mirror of
https://github.com/rad4day/Waybar.git
synced 2025-07-13 14:42:29 +02:00
Add style classes for hyprland/submap
This commit is contained in:
@ -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();
|
||||||
|
Reference in New Issue
Block a user