[tekui-devel] tekui: Now copies borders in refreshes, saving a refresh of the ...

hg-notify at neoscientists.org hg-notify at neoscientists.org
Tue Feb 5 02:46:01 CET 2008


details:   http://hg.teklib.org/tekui/rev/d522c8ea09b1
changeset: 348:d522c8ea09b1
user:      Timm S. Mueller <tmueller at neoscientists.org>
date:      Tue Jan 29 20:43:09 2008 +0100
description:
Now copies borders in refreshes, saving a refresh of the parent group

diffs (51 lines):

diff -r 436b20dbbea8 -r d522c8ea09b1 tek/class/ui/area.lua
--- a/tek/class/ui/area.lua	Tue Jan 29 20:21:05 2008 +0100
+++ b/tek/class/ui/area.lua	Tue Jan 29 20:43:09 2008 +0100
@@ -30,7 +30,7 @@ local floor = math.floor
 local floor = math.floor
 
 module("tek.class.ui.area", tek.class.ui.element)
-_VERSION = "Area 4.0"
+_VERSION = "Area 4.1"
 local Area = _M
 
 -------------------------------------------------------------------------------
@@ -171,8 +171,9 @@ function Area:layout(x0, y0, x1, y1, mar
 			((dw == 0 and dh == 0) or self.TrackDamage) then
 			-- can refresh this element by shifting:
 
-			local s1, s2, s3, s4 = overlap(r[1], r[2], r[3], r[4],
-				x0 - dx, y0 - dy, x1 - dx, y1 - dy)
+			local s1, s2, s3, s4 = overlap(r[1] - m[1], r[2] - m[2],
+				r[3] + m[3], r[4] + m[4], x0 - dx - m[1], y0 - dy - m[2],
+				x1 - dx + m[3], y1 - dy + m[4])
 			if s1 then
 				local key = ("%d:%d"):format(dx, dy)
 				-- local key = dx == 0 and dy or dx
@@ -182,10 +183,10 @@ function Area:layout(x0, y0, x1, y1, mar
 				else
 					ca[key] = { dx, dy, Region.new(s1, s2, s3, s4) }
 				end
-				-- redraw background [TODO]:
-				if self.Parent then
-					self.Parent.Redraw = true
-				end
+				-- redraw background:
+				-- if self.Parent then
+				-- 	self.Parent.Redraw = true
+				-- end
 			end
 
 			if dw > 0 or dh > 0 then
diff -r 436b20dbbea8 -r d522c8ea09b1 tek/class/ui/window.lua
--- a/tek/class/ui/window.lua	Tue Jan 29 20:21:05 2008 +0100
+++ b/tek/class/ui/window.lua	Tue Jan 29 20:43:09 2008 +0100
@@ -20,7 +20,7 @@ local insert, remove, sort = table.inser
 local insert, remove, sort = table.insert, table.remove, table.sort
 
 module("tek.class.ui.window", tek.class.ui.group)
-_VERSION = "Window 1.9"
+_VERSION = "Window 1.10"
 
 -------------------------------------------------------------------------------
 --	Constants & Class data:


More information about the tekui-devel mailing list