Merge pull request #4507 from workflow/niri-language-add-css-classes
feat(niri/language): add CSS classes
This commit is contained in:
@ -58,6 +58,16 @@ void Language::doUpdate() {
|
||||
spdlog::debug("niri language update with short description {}", layout.short_description);
|
||||
spdlog::debug("niri language update with variant {}", layout.variant);
|
||||
|
||||
if (!last_short_name_.empty()) {
|
||||
label_.get_style_context()->remove_class(last_short_name_);
|
||||
}
|
||||
if (!layout.short_name.empty()) {
|
||||
label_.get_style_context()->add_class(layout.short_name);
|
||||
last_short_name_ = layout.short_name;
|
||||
} else {
|
||||
last_short_name_.clear();
|
||||
}
|
||||
|
||||
std::string layoutName = std::string{};
|
||||
if (config_.isMember("format-" + layout.short_description + "-" + layout.variant)) {
|
||||
const auto propName = "format-" + layout.short_description + "-" + layout.variant;
|
||||
|
Reference in New Issue
Block a user