mirror of
				https://github.com/rad4day/Waybar.git
				synced 2025-10-30 23:42:42 +01:00 
			
		
		
		
	remove empty and solo classes when they do not apply
This commit is contained in:
		| @@ -31,8 +31,10 @@ void Window::onCmd(const struct Ipc::ipc_response& res) { | |||||||
|       bar_.window.get_style_context()->remove_class(app_id_); |       bar_.window.get_style_context()->remove_class(app_id_); | ||||||
|     } |     } | ||||||
|     if (nb == 0) { |     if (nb == 0) { | ||||||
|  |       bar_.window.get_style_context()->remove_class("solo"); | ||||||
|       bar_.window.get_style_context()->add_class("empty"); |       bar_.window.get_style_context()->add_class("empty"); | ||||||
|     } else if (nb == 1) { |     } else if (nb == 1) { | ||||||
|  |       bar_.window.get_style_context()->remove_class("empty"); | ||||||
|       bar_.window.get_style_context()->add_class("solo"); |       bar_.window.get_style_context()->add_class("solo"); | ||||||
|       if (!app_id.empty()) { |       if (!app_id.empty()) { | ||||||
|         bar_.window.get_style_context()->add_class(app_id); |         bar_.window.get_style_context()->add_class(app_id); | ||||||
| @@ -99,4 +101,4 @@ void Window::getTree() { | |||||||
|   } |   } | ||||||
| } | } | ||||||
|  |  | ||||||
| }  // namespace waybar::modules::sway | }  // namespace waybar::modules::sway | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Adam Pioterek
					Adam Pioterek