mirror of
				https://github.com/rad4day/Waybar.git
				synced 2025-10-31 07:52:42 +01:00 
			
		
		
		
	feat(idle): add status class
This commit is contained in:
		| @@ -109,3 +109,8 @@ window#waybar { | ||||
| #idle_inhibitor { | ||||
|     background-color: #2d3436; | ||||
| } | ||||
|  | ||||
| #idle_inhibitor.activated { | ||||
|     background-color: #ecf0f1; | ||||
|     color: #2d3436; | ||||
| } | ||||
|   | ||||
| @@ -27,6 +27,7 @@ auto waybar::modules::IdleInhibitor::update() -> void | ||||
|   label_.set_markup( | ||||
|       fmt::format(format_, fmt::arg("status", status_), | ||||
|                   fmt::arg("icon", getIcon(0, status_)))); | ||||
|   label_.get_style_context()->add_class(status_); | ||||
|   if(tooltipEnabled()) { | ||||
|     label_.set_tooltip_text(status_); | ||||
|   } | ||||
| @@ -34,6 +35,7 @@ auto waybar::modules::IdleInhibitor::update() -> void | ||||
|  | ||||
| bool waybar::modules::IdleInhibitor::handleToggle(GdkEventButton* const& e) { | ||||
|   if (e->button == 1) { | ||||
|     label_.get_style_context()->remove_class(status_); | ||||
|     if (idle_inhibitor_) { | ||||
|       zwp_idle_inhibitor_v1_destroy(idle_inhibitor_); | ||||
|       idle_inhibitor_ = nullptr; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Alex
					Alex