mirror of
				https://github.com/rad4day/Waybar.git
				synced 2025-11-04 09:42:42 +01:00 
			
		
		
		
	Added "icon-size" and "hide-if-empty" config options
This commit is contained in:
		@@ -18,8 +18,17 @@ UPower::UPower(const std::string& id, const Json::Value& config)
 | 
			
		||||
  box_.pack_start(label_);
 | 
			
		||||
  event_box_.add(box_);
 | 
			
		||||
 | 
			
		||||
  // Icon Size
 | 
			
		||||
  if (config_["icon-size"].isUInt()) {
 | 
			
		||||
    iconSize = config_["icon-size"].asUInt();
 | 
			
		||||
  }
 | 
			
		||||
  icon_.set_pixel_size(iconSize);
 | 
			
		||||
 | 
			
		||||
  // Hide If Empty
 | 
			
		||||
  if (config_["hide-if-empty"].isBool()) {
 | 
			
		||||
    hideIfEmpty = config_["hide-if-empty"].asBool();
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  GError* error = NULL;
 | 
			
		||||
  client = up_client_new_full(NULL, &error);
 | 
			
		||||
  if (client == NULL) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user