[tekui-devel] tekui: Makefile: using absolute TEKLIB path again; Text: now sup...
Timm S. Mueller
tmueller at neoscientists.org
Tue Apr 15 21:59:00 CEST 2008
details: http://hg.teklib.org/tekui/rev/7b9991e94753
changeset: 428:7b9991e94753
user: Timm S. Mueller <tmueller at neoscientists.org>
date: Tue Apr 15 10:27:29 2008 +0200
description:
Makefile: using absolute TEKLIB path again; Text: now supports multiple texts
with indiivdual margins and fonts, added TextVAlign attribute, added
getTextSize() method; MenuItem: added Shortcut attribute; Window, PopItem:
"Focus" notification renamed to "WindowFocus" (was confused with element
focus), fixing faulty Popwindow collapsing; Window: added IsPopup attribute,
text width calculation in popups for shortcut text alignment; TextInput:
adapted; Group: Tab group Width is now set to "fill"; List: HSliderMode
attribute is now overridden only if not present
diffs (truncated from 695 to 100 lines):
diff -r c56fc02047ea -r 7b9991e94753 Makefile
--- a/Makefile Mon Apr 14 18:03:16 2008 +0200
+++ b/Makefile Tue Apr 15 10:27:29 2008 +0200
@@ -1,6 +1,6 @@
# TEKlib source directory:
-TEKLIB ?= $(PWD)/../../teklib/dev
+TEKLIB ?= /work/teklib/dev
# Target platform or standard:
PLATFORM ?= posix
diff -r c56fc02047ea -r 7b9991e94753 tek/app/ui/tekui.lua
--- a/tek/app/ui/tekui.lua Mon Apr 14 18:03:16 2008 +0200
+++ b/tek/app/ui/tekui.lua Tue Apr 15 10:27:29 2008 +0200
@@ -121,6 +121,7 @@ ui.application:new
ui.spacer:new { },
ui.menuitem:new {
Label = "Quit",
+ Shortcut = "Ctrl+Q",
Notifications =
{
["Pressed"] =
diff -r c56fc02047ea -r 7b9991e94753 tek/class/ui/checkmark.lua
--- a/tek/class/ui/checkmark.lua Mon Apr 14 18:03:16 2008 +0200
+++ b/tek/class/ui/checkmark.lua Tue Apr 15 10:27:29 2008 +0200
@@ -15,7 +15,7 @@ local max = math.max
local max = math.max
module("tek.class.ui.checkmark", tek.class.ui.text)
-_VERSION = "CheckMark 2.8"
+_VERSION = "CheckMark 2.9"
-------------------------------------------------------------------------------
-- Constants & Class data:
@@ -87,10 +87,21 @@ function CheckMark.init(self)
self.Image = self.Image or CheckImage1
self.AltImage = self.AltImage or CheckImage2
self.Mode = self.Mode or "toggle"
- self.TextHAlign = self.TextHAlign or "left"
self.ImageMinHeight = self.ImageMinHeight or DEF_IMAGEMINHEIGHT
self.ImageWidth = false
self.ImageHeight = false
+ self.TextRecords =
+ {
+ {
+ self.Label,
+ "",
+ "left",
+ "center",
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ false,
+ }
+ }
return Text.init(self)
end
@@ -132,13 +143,17 @@ end
-------------------------------------------------------------------------------
function CheckMark:askMinMax(m1, m2, m3, m4)
- local w, h = ui.Display:textSize(self.Font, self.Label or " ")
+ local tr = self.TextRecords[1]
+ local w, h = ui.Display:textSize(tr[13], tr[1] or " ")
self.ImageHeight = max(h, self.ImageMinHeight or h)
self.ImageWidth = self.ImageHeight * self.Drawable.AspectX /
self.Drawable.AspectY
h = max(0, self.ImageHeight - h)
local h2 = floor(h / 2)
- self.TextMargin = { self.ImageWidth, h2, 0, h - h2 }
+ tr[5] = self.ImageWidth
+ tr[6] = h2
+ tr[7] = 0
+ tr[8] = h - h2
return Text.askMinMax(self, m1, m2, m3, m4)
end
diff -r c56fc02047ea -r 7b9991e94753 tek/class/ui/group.lua
--- a/tek/class/ui/group.lua Mon Apr 14 18:03:16 2008 +0200
+++ b/tek/class/ui/group.lua Tue Apr 15 10:27:29 2008 +0200
@@ -21,7 +21,7 @@ local unpack = unpack
local unpack = unpack
module("tek.class.ui.group", tek.class.ui.gadget)
-_VERSION = "Group 5.0"
+_VERSION = "Group 5.1"
local Group = _M
-------------------------------------------------------------------------------
@@ -165,6 +165,7 @@ function Group.newTabGroup(class, self)
{
Group:newRegularGroup
{
+ Width = "fill",
Padding = DEF_TABGROUPPADDING,
Border = DEF_TABGROUPBORDER,
BorderStyle = "socket",
diff -r c56fc02047ea -r 7b9991e94753 tek/class/ui/list.lua
--- a/tek/class/ui/list.lua Mon Apr 14 18:03:16 2008 +0200
+++ b/tek/class/ui/list.lua Tue Apr 15 10:27:29 2008 +0200
More information about the tekui-devel
mailing list