[tekui-devel] tekui: visual: drawimage now supported in integer builds; Slider...
Timm S. Mueller
tmueller at neoscientists.org
Sat Mar 29 05:06:29 CET 2008
details: http://hg.teklib.org/tekui/rev/dec1fdab244a
changeset: 386:dec1fdab244a
user: Timm S. Mueller <tmueller at neoscientists.org>
date: Thu Mar 27 13:49:14 2008 +0100
description:
visual: drawimage now supported in integer builds; Slider: nicer style;
ScrollGroup: nicer arrows and style; CheckMark: nicer style; Canvas: refresh
problems in AutoWidth/Height hopefully fixed this time
diffs (truncated from 195 to 100 lines):
diff -r 30190b475297 -r dec1fdab244a TODO
--- a/TODO Thu Mar 27 00:47:58 2008 +0100
+++ b/TODO Thu Mar 27 13:49:14 2008 +0100
@@ -31,6 +31,7 @@
=== Bugs ===
* overlong group headings
+ * potential memory leak in visual.drawimage()
* Foreign elements are getting hilited during move
* Antialiased fonts not supported with Composite Extension
* Initial Window refresh problem: layout/rendered twice
diff -r 30190b475297 -r dec1fdab244a tek/app/ui/gridalign.lua
--- a/tek/app/ui/gridalign.lua Thu Mar 27 00:47:58 2008 +0100
+++ b/tek/app/ui/gridalign.lua Thu Mar 27 13:49:14 2008 +0100
@@ -163,10 +163,10 @@ ui.application:new
Legend = "Vert",
Children =
{
- ui.RadioButton:new { Label = "Top", Selected = true,
+ ui.RadioButton:new { Label = "Top",
onPress = function(self) setinner(self, "VAlign", 0) end
},
- ui.RadioButton:new { Label = "Center",
+ ui.RadioButton:new { Label = "Center", Selected = true,
onPress = function(self) setinner(self, "VAlign", 1) end
},
ui.RadioButton:new { Label = "Bottom",
diff -r 30190b475297 -r dec1fdab244a tek/class/ui/canvas.lua
--- a/tek/class/ui/canvas.lua Thu Mar 27 00:47:58 2008 +0100
+++ b/tek/class/ui/canvas.lua Thu Mar 27 13:49:14 2008 +0100
@@ -136,6 +136,7 @@ function Canvas:layout(r1, r2, r3, r4, m
w = max(w, mm[1])
w = mm[3] and min(w, mm[3]) or w
if w ~= self.Width then
+ self.ScrollGroup:setTop(0)
self.ScrollGroup:setLeft(0)
self.ScrollGroup:setWidth(w)
sizechanged = true
@@ -148,6 +149,7 @@ function Canvas:layout(r1, r2, r3, r4, m
h = mm[4] and min(h, mm[4]) or h
if h ~= self.Height then
self.ScrollGroup:setTop(0)
+ self.ScrollGroup:setLeft(0)
self.ScrollGroup:setHeight(h)
sizechanged = true
end
diff -r 30190b475297 -r dec1fdab244a tek/class/ui/checkmark.lua
--- a/tek/class/ui/checkmark.lua Thu Mar 27 00:47:58 2008 +0100
+++ b/tek/class/ui/checkmark.lua Thu Mar 27 13:49:14 2008 +0100
@@ -24,9 +24,9 @@ local coords =
local coords =
{
-- shadow:
- -3,4, -4,3, -3,-2, -4,-3, -2,-3, -3,-4, 4,-3, 3,-4,
+ -3,5, -5,3, -3,-2, -5,-3, -2,-3, -3,-5, 5,-3, 3,-5,
-- shine:
- -3,3, 3,4, 2,3, 4,3, 3,2, 3,-3,
+ -3,3, 3,5, 2,3, 5,3, 3,2, 3,-3,
-- check:
0,0, -2,3, -3,2, -1,0, -3,-2, -2,-3, 0,-1, 2,-3, 3,-2, 1,0, 3,2, 2,3, 0,1
}
@@ -48,7 +48,7 @@ CheckImage1 = VectorImage:new
{ 0x1000, 8, Points = points1, Pen = ui.PEN_HALFSHINE },
{ 0x1000, 8, Points = points2, Pen = ui.PEN_HALFSHADOW },
},
- MinMax = { -4, 4, 4, -4 },
+ MinMax = { -5, 5, 5, -5 },
}
}
@@ -62,7 +62,7 @@ CheckImage2 = VectorImage:new
{ 0x1000, 8, Points = points2, Pen = ui.PEN_HALFSHADOW },
{ 0x2000, 14, Points = points3, Pen = ui.PEN_BUTTONTEXT },
},
- MinMax = { -4, 4, 4, -4 },
+ MinMax = { -5, 5, 5, -5 },
}
}
diff -r 30190b475297 -r dec1fdab244a tek/class/ui/scrollgroup.lua
--- a/tek/class/ui/scrollgroup.lua Thu Mar 27 00:47:58 2008 +0100
+++ b/tek/class/ui/scrollgroup.lua Thu Mar 27 13:49:14 2008 +0100
@@ -32,21 +32,22 @@ _VERSION = "ScrollGroup 1.2"
-- ArrowButton
-------------------------------------------------------------------------------
+local ARROWMARGIN = { 0, 0, 0, 0 }
local ARROWPADDING = { 0, 0, 0, 0 }
-local ARROWIMAGEMARGIN = { 3, 3, 3, 3 }
-
-local coordx = { 0,0, 1,1, 1,-1 }
-local coordy = { 0,0, 1,1, -1,1 }
+local ARROWIMAGEMARGIN = { 1, 1, 1, 1 }
+
+local coordx = { 0,0, 10,10, 10,-10 }
+local coordy = { 0,0, 10,10, -10,10 }
local prims = { { 0x1000, 3, Points = { 1, 2, 3 }, Pen = ui.PEN_BUTTONTEXT } }
local ArrowUpImage = ui.VectorImage:new { ImageData = { Coords = coordy,
- Primitives = prims, MinMax = { 1,1, -1,-0 } } }
More information about the tekui-devel
mailing list