[tekui-devel] tekui: All layouting (including processing of the Width/Height h...
Timm S. Mueller
tmueller at neoscientists.org
Sat Apr 12 15:53:54 CEST 2008
details: http://hg.teklib.org/tekui/rev/59a8fc318a80
changeset: 424:59a8fc318a80
user: Timm S. Mueller <tmueller at neoscientists.org>
date: Sat Apr 12 01:18:18 2008 +0200
description:
All layouting (including processing of the Width/Height hints) is now properly
isolated in the Layout class
diffs (truncated from 291 to 100 lines):
diff -r 0fe920bcc681 -r 59a8fc318a80 tek/app/ui/alignment.lua
--- a/tek/app/ui/alignment.lua Fri Apr 11 02:16:05 2008 +0200
+++ b/tek/app/ui/alignment.lua Sat Apr 12 01:18:18 2008 +0200
@@ -25,7 +25,11 @@ ui.Application:new
{
ui.text:new { Label = "Begin", Mode = "button", Width = "auto", Height = "free", HAlign = "left" },
ui.text:new { Label = "Center", Mode = "button", Width = "auto", Height = "free", HAlign = "center" },
- ui.text:new { Label = "End", Mode = "button", Width = "auto", Height = "free", HAlign = "right" },
+ ui.group:new { Legend = "Group", Width = "auto", HAlign = "right", Height = "free",
+ Children = {
+ ui.text:new { Label = "End", Height = "free", Mode = "button" }
+ }
+ },
},
},
ui.group:new
@@ -36,7 +40,11 @@ ui.Application:new
{
ui.text:new { Label = "Begin", Mode = "button", Width = "free", Height = "auto", VAlign = "top" },
ui.text:new { Label = "Center", Mode = "button", Width = "free", Height = "auto", VAlign = "center" },
- ui.text:new { Label = "End", Mode = "button", Width = "free", Height = "auto", VAlign = "bottom" },
+ ui.group:new { Legend = "Group", Width = "free", VAlign = "bottom", Height = "auto",
+ Children = {
+ ui.text:new { Label = "End", Width = "free", Mode = "button" }
+ }
+ }
},
},
},
diff -r 0fe920bcc681 -r 59a8fc318a80 tek/app/ui/bashing.lua
--- a/tek/app/ui/bashing.lua Fri Apr 11 02:16:05 2008 +0200
+++ b/tek/app/ui/bashing.lua Sat Apr 12 01:18:18 2008 +0200
@@ -1,6 +1,8 @@
#!/usr/bin/env lua
local ui = require "tek.lib.ui"
+local db = require "tek.lib.debug"
+db.level = 4
ui.application:new {
Children = {
diff -r 0fe920bcc681 -r 59a8fc318a80 tek/app/ui/tekui.lua
--- a/tek/app/ui/tekui.lua Fri Apr 11 02:16:05 2008 +0200
+++ b/tek/app/ui/tekui.lua Sat Apr 12 01:18:18 2008 +0200
@@ -146,6 +146,8 @@ ui.application:new
ui.group:new
{
Height = "auto",
+ Width = "auto",
+ Legend = "Dynamic",
Children =
{
ui.text:new
@@ -289,6 +291,7 @@ ui.application:new
},
ui.group:new
{
+ Width = "fill",
Height = "auto",
GridW = 3,
VAlign = "center",
@@ -304,6 +307,7 @@ ui.application:new
},
ui.group:new
{
+ Width = "fill",
Height = "auto",
Children =
{
diff -r 0fe920bcc681 -r 59a8fc318a80 tek/class/ui/area.lua
--- a/tek/class/ui/area.lua Fri Apr 11 02:16:05 2008 +0200
+++ b/tek/class/ui/area.lua Sat Apr 12 01:18:18 2008 +0200
@@ -37,7 +37,7 @@ local floor = math.floor
local floor = math.floor
module("tek.class.ui.area", tek.class.ui.element)
-_VERSION = "Area 5.14"
+_VERSION = "Area 5.15"
local Area = _M
-------------------------------------------------------------------------------
@@ -212,22 +212,6 @@ function Area:askMinMax(m1, m2, m3, m4)
m3 = m3 and m3 + m[1] + m[3]
m4 = m4 and m4 + m[2] + m[4]
- if self.Width == "auto" then
- m3 = m1
- elseif self.Width == "fill" then
- m3 = nil
- elseif self.Width == "free" then
- m3 = ui.HUGE
- end
-
- if self.Height == "auto" then
- m4 = m2
- elseif self.Height == "fill" then
- m4 = nil
- elseif self.Height == "free" then
- m4 = ui.HUGE
- end
More information about the tekui-devel
mailing list