mirror of
				https://codeberg.org/1414codeforge/yui.git
				synced 2025-06-05 22:19:11 +02:00 
			
		
		
		
	[columns,rows] Remove superfluous widget types, leave containers as Layouts.
This commit is contained in:
		| @@ -2,9 +2,6 @@ local BASE = (...):gsub('columns', '') | ||||
|  | ||||
| local Layout = require(BASE..'layout') | ||||
|  | ||||
| local Columns = setmetatable({}, Layout) | ||||
| Columns.__index = Columns | ||||
|  | ||||
|  | ||||
| -- Advance position to next column, | ||||
| -- given current position, widget dimensions and padding. | ||||
| @@ -12,8 +9,8 @@ local function columnadvance(x,y, ww,wh, padding) | ||||
|     return x + ww + padding, y | ||||
| end | ||||
|  | ||||
| function Columns.new(args) | ||||
|     local self = setmetatable(Layout.new(args), Columns) | ||||
| function Columns(args) | ||||
|     local self = Layout.new(args) | ||||
|  | ||||
|     self.advance = columnadvance | ||||
|     self.prev = 'left' | ||||
|   | ||||
							
								
								
									
										9
									
								
								rows.lua
									
									
									
									
									
								
							
							
						
						
									
										9
									
								
								rows.lua
									
									
									
									
									
								
							| @@ -1,10 +1,7 @@ | ||||
| local BASE = (...):gsub('rows') | ||||
| local BASE = (...):gsub('rows', '') | ||||
|  | ||||
| local Layout = require(BASE..'layout') | ||||
|  | ||||
| local Rows = setmetatable({}, Layout) | ||||
| Rows.__index = Rows | ||||
|  | ||||
|  | ||||
| -- Advance position to next row, | ||||
| -- given current position, widget dimensions and padding. | ||||
| @@ -12,8 +9,8 @@ local function rowadvance(x,y, ww,wh, padding) | ||||
|     return x, y + wh + padding | ||||
| end | ||||
|  | ||||
| function Rows.new(args) | ||||
|     local self = setmetatable(Layout.new(args), Rows) | ||||
| function Rows(args) | ||||
|     local self = Layout.new(args) | ||||
|  | ||||
|     self.advance = rowadvance | ||||
|     self.prev = 'up' | ||||
|   | ||||
		Reference in New Issue
	
	Block a user