fix(Label): ELLIPSIZE all label modules
This commit is contained in:
		
							parent
							
								
									22ddbde394
								
							
						
					
					
						commit
						bd5146fdcf
					
				| 
						 | 
				
			
			@ -21,6 +21,8 @@ ALabel::ALabel(const Json::Value& config, const std::string& name, const std::st
 | 
			
		|||
  if (config_["max-length"].isUInt()) {
 | 
			
		||||
    label_.set_max_width_chars(config_["max-length"].asUInt());
 | 
			
		||||
    label_.set_ellipsize(Pango::EllipsizeMode::ELLIPSIZE_END);
 | 
			
		||||
  } else if (label_.get_max_width_chars() == -1) {
 | 
			
		||||
    label_.set_ellipsize(Pango::EllipsizeMode::ELLIPSIZE_END);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  if (config_["rotate"].isUInt()) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -5,9 +5,6 @@ namespace waybar::modules::sway {
 | 
			
		|||
 | 
			
		||||
Window::Window(const std::string& id, const Bar& bar, const Json::Value& config)
 | 
			
		||||
    : ALabel(config, "window", id, "{}"), bar_(bar), windowId_(-1) {
 | 
			
		||||
  if (label_.get_max_width_chars() == -1) {
 | 
			
		||||
    label_.set_ellipsize(Pango::EllipsizeMode::ELLIPSIZE_END);
 | 
			
		||||
  }
 | 
			
		||||
  ipc_.subscribe(R"(["window","workspace"])");
 | 
			
		||||
  ipc_.signal_event.connect(sigc::mem_fun(*this, &Window::onEvent));
 | 
			
		||||
  ipc_.signal_cmd.connect(sigc::mem_fun(*this, &Window::onCmd));
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue