mirror of
				https://github.com/rad4day/Waybar.git
				synced 2025-11-04 09:42:42 +01:00 
			
		
		
		
	Add spacing config option
This option allows to add spaces between the modules. It uses Gtk:Box's spacing property.
This commit is contained in:
		@@ -438,6 +438,13 @@ waybar::Bar::Bar(struct waybar_output* w_output, const Json::Value& w_config)
 | 
				
			|||||||
  center_.get_style_context()->add_class("modules-center");
 | 
					  center_.get_style_context()->add_class("modules-center");
 | 
				
			||||||
  right_.get_style_context()->add_class("modules-right");
 | 
					  right_.get_style_context()->add_class("modules-right");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  if (config["spacing"].isInt()) {
 | 
				
			||||||
 | 
					    int spacing = config["spacing"].asInt();
 | 
				
			||||||
 | 
					    left_.set_spacing(spacing);
 | 
				
			||||||
 | 
					    center_.set_spacing(spacing);
 | 
				
			||||||
 | 
					    right_.set_spacing(spacing);
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  uint32_t height = config["height"].isUInt() ? config["height"].asUInt() : 0;
 | 
					  uint32_t height = config["height"].isUInt() ? config["height"].asUInt() : 0;
 | 
				
			||||||
  uint32_t width = config["width"].isUInt() ? config["width"].asUInt() : 0;
 | 
					  uint32_t width = config["width"].isUInt() ? config["width"].asUInt() : 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user