mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 12:52:44 +00:00 
			
		
		
		
	 2def3d8d3f
			
		
	
	
		2def3d8d3f
		
	
	
	
	
		
			
			My needs are really quite simple, so I'm just going to add what I need as I go along. The first thing I needed was a simple box layout with widgets being able to say whether they prefer fixed or fill for both their vertical and horizontal sizes. I also made a simple GStatusBar so FileManager can show how many bytes worth of files are in the current directory.
		
			
				
	
	
		
			18 lines
		
	
	
	
		
			345 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
	
		
			345 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| #pragma once
 | |
| 
 | |
| #include <LibGUI/GLayout.h>
 | |
| #include <LibGUI/GWidget.h>
 | |
| 
 | |
| class GBoxLayout final : public GLayout {
 | |
| public:
 | |
|     explicit GBoxLayout(Orientation);
 | |
|     virtual ~GBoxLayout() override;
 | |
| 
 | |
|     Orientation orientation() const { return m_orientation; }
 | |
| 
 | |
|     virtual void run(GWidget&) override;
 | |
| 
 | |
| private:
 | |
|     Orientation m_orientation;
 | |
| };
 | |
| 
 |