add layout as class to language module

pull/1628/head
Carlos Ortega 2022-07-17 16:13:32 +01:00
parent 1116ff0d67
commit 48d2759df5
1 changed files with 2 additions and 0 deletions

View File

@ -120,7 +120,9 @@ auto Language::update() -> void {
} }
auto Language::set_current_layout(std::string current_layout) -> void { auto Language::set_current_layout(std::string current_layout) -> void {
label_.get_style_context()->remove_class(layout_.short_name);
layout_ = layouts_map_[current_layout]; layout_ = layouts_map_[current_layout];
label_.get_style_context()->add_class(layout_.short_name);
} }
auto Language::init_layouts_map(const std::vector<std::string>& used_layouts) -> void { auto Language::init_layouts_map(const std::vector<std::string>& used_layouts) -> void {