[tekui-devel] tekui: Text: renamed Mode = "caption" to Style = "caption"; Text...

Timm S. Mueller tmueller at neoscientists.org
Sun Apr 20 23:46:03 CEST 2008


details:   http://hg.teklib.org/tekui/rev/b43f426a810c
changeset: 435:b43f426a810c
user:      Timm S. Mueller <tmueller at neoscientists.org>
date:      Sun Apr 20 23:40:42 2008 +0200
description:
Text: renamed Mode = "caption" to Style = "caption"; TextInput: minor
optimizations and cleanup

diffs (truncated from 171 to 100 lines):

diff -r c91039582acb -r b43f426a810c tek/app/ui/filereq.lua
--- a/tek/app/ui/filereq.lua	Sun Apr 20 00:58:59 2008 +0200
+++ b/tek/app/ui/filereq.lua	Sun Apr 20 23:40:42 2008 +0200
@@ -64,11 +64,11 @@ ui.Application:new
 					GridW = 3,
 					Children =
 					{
-						ui.Text:new { Mode = "caption", Label = "Dir.", Width = "fill", Height = "fill" },
+						ui.Text:new { Style = "caption", Label = "Dir.", Width = "fill", Height = "fill" },
 						ui.TextInput:new { Label = "Directory" },
 						ui.Text:new { Mode = "button", Label = "Reload", Width = "auto" },
 
-						ui.Text:new { Mode = "caption", Label = "File", Width = "fill", Height = "fill" },
+						ui.Text:new { Style = "caption", Label = "File", Width = "fill", Height = "fill" },
 						ui.TextInput:new { Label = "File" },
 						ui.Text:new { Mode = "button", Label = "Hidden", Width = "auto" },
 
diff -r c91039582acb -r b43f426a810c tek/app/ui/sudoku.lua
--- a/tek/app/ui/sudoku.lua	Sun Apr 20 00:58:59 2008 +0200
+++ b/tek/app/ui/sudoku.lua	Sun Apr 20 23:40:42 2008 +0200
@@ -513,7 +513,7 @@ ui.application:new {
 								ui.Text:new {
 									Label = "Code:",
 									FontSpec = ":20",
-									Mode = "caption",
+									Style = "caption",
 								},
 								ui.textinput:new {
 									Id = "code",
diff -r c91039582acb -r b43f426a810c tek/app/ui/tekui.lua
--- a/tek/app/ui/tekui.lua	Sun Apr 20 00:58:59 2008 +0200
+++ b/tek/app/ui/tekui.lua	Sun Apr 20 23:40:42 2008 +0200
@@ -296,7 +296,7 @@ ui.application:new
 													Legend = "Parameters",
 													GridW = 2,
 													Children = {
-														ui.text:new { Label = "Speed", Mode = "caption", Width = "fill" },
+														ui.text:new { Label = "Speed", Style = "caption", Width = "fill" },
 														ui.Slider:new {
 															Width = "free",
 															HFreedom = true,
@@ -309,7 +309,7 @@ ui.application:new
 																},
 															},
 														},
-														ui.text:new { Label = "Focus", Mode = "caption", Width = "fill" },
+														ui.text:new { Label = "Focus", Style = "caption", Width = "fill" },
 														ui.Slider:new {
 															HFreedom = true,
 															Position = { 0x10000 * 0x50 / 0x400, 0, 0x10000 * 0x51 / 0x400, 0 },
@@ -321,7 +321,7 @@ ui.application:new
 																},
 															},
 														},
-														ui.text:new { Label = "Segments", Mode = "caption", Width = "fill" },
+														ui.text:new { Label = "Segments", Style = "caption", Width = "fill" },
 														ui.Slider:new {
 															StepX = 0x10000 / 32,
 															HFreedom = true,
@@ -354,10 +354,10 @@ ui.application:new
 					VAlign = "center",
 					Children =
 					{
-						ui.text:new { Label = "Dir:", Mode = "caption", Width = "fill" },
+						ui.text:new { Label = "Dir:", Style = "caption", Width = "fill" },
 						ui.textinput:new { Label = "Directory", Disabled = true },
 						ui.text:new { Mode = "button", Label = "Reload", Disabled = true, Width = "auto" },
-						ui.text:new { Label = "Filename:", Mode = "caption", Width = "fill" },
+						ui.text:new { Label = "Filename:", Style = "caption", Width = "fill" },
 						ui.textinput:new { Label = "Filename" },
 						ui.text:new { Mode = "button", Label = "Hidden", Width = "auto" },
 					},
diff -r c91039582acb -r b43f426a810c tek/class/ui/text.lua
--- a/tek/class/ui/text.lua	Sun Apr 20 00:58:59 2008 +0200
+++ b/tek/class/ui/text.lua	Sun Apr 20 23:40:42 2008 +0200
@@ -16,7 +16,7 @@ local remove = table.remove
 local remove = table.remove
 
 module("tek.class.ui.text", tek.class.ui.gadget)
-_VERSION = "Text 3.5"
+_VERSION = "Text 3.6"
 
 -------------------------------------------------------------------------------
 --	Constants & Class data:
@@ -36,6 +36,7 @@ function Text.init(self)
 	self.Height = self.Height or "auto"
 	self.Label = self.Label or ""
 	self.Mode = self.Mode or "inert"
+	self.Style = self.Style or "normal"
 	self.TextHAlign = self.TextHAlign or "center"
 	self.TextRecords = self.TextRecords or false
 	self.TextVAlign = self.TextVAlign or "center"
@@ -69,17 +70,18 @@ function Text:setupDisplay(display, draw
 function Text:setupDisplay(display, drawable)
 	local theme = display.Theme
 	self.FontSpec = self.FontSpec or theme.TextFontSpec or false
-	if self.Mode == "inert" then
+	if self.Style == "caption" then
+		self.BorderStyle = self.BorderStyle or "none"
+		self.IBorderStyle = self.IBorderStyle or "none"


More information about the tekui-devel mailing list