[tekui-devel] tekui: Handle: improved looks, better calculation of napped surf...
Timm S. Mueller
tmueller at neoscientists.org
Fri May 9 14:26:19 CEST 2008
details: http://hg.teklib.org/tekui/rev/5f3b608c59ea
changeset: 468:5f3b608c59ea
user: Timm S. Mueller <tmueller at neoscientists.org>
date: Tue May 06 19:20:05 2008 +0200
description:
Handle: improved looks, better calculation of napped surface; PopItem, Theme:
Hilited menuitems now look like selected ones; List: separated Cursor and
Selected states; display_x11: improved debug output, corrected font height
calculation in Xft case
diffs (truncated from 282 to 100 lines):
diff -r 50bd09ec3d5b -r 5f3b608c59ea src/display_x11/display_x11_font.c
--- a/src/display_x11/display_x11_font.c Tue May 06 15:27:26 2008 +0200
+++ b/src/display_x11/display_x11_font.c Tue May 06 19:20:05 2008 +0200
@@ -1490,7 +1490,8 @@ x11_hostgetfattrfunc(struct THook *hook,
case TVisual_FontHeight:
*((TINT *) item->tti_Value) = mod->x11_use_xft ?
- fn->xftfont->height : fn->font->ascent + fn->font->descent;
+ fn->xftfont->ascent + fn->xftfont->descent :
+ fn->font->ascent + fn->font->descent;
break;
case TVisual_FontUlPosition:
diff -r 50bd09ec3d5b -r 5f3b608c59ea src/display_x11/display_x11_inst.c
--- a/src/display_x11/display_x11_inst.c Tue May 06 15:27:26 2008 +0200
+++ b/src/display_x11/display_x11_inst.c Tue May 06 19:20:05 2008 +0200
@@ -512,7 +512,7 @@ x11_processevent(TMOD_X11 *mod)
if (v == TNULL)
{
TDBPRINTF(TDB_WARN,
- ("Message %d from unknown window: %p\n", ev.type, w));
+ ("Message Type %04x from unknown window: %p\n", ev.type, w));
continue;
}
diff -r 50bd09ec3d5b -r 5f3b608c59ea tek/class/ui/handle.lua
--- a/tek/class/ui/handle.lua Tue May 06 15:27:26 2008 +0200
+++ b/tek/class/ui/handle.lua Tue May 06 19:20:05 2008 +0200
@@ -16,7 +16,7 @@ local min = math.min
local min = math.min
module("tek.class.ui.handle", tek.class.ui.gadget)
-_VERSION = "Handle 2.0"
+_VERSION = "Handle 2.1"
local Handle = _M
@@ -272,7 +272,7 @@ end
function Handle:draw()
Gadget.draw(self)
- local RATIO = 0.6
+ local RATIO = 0.3
local OFFS = 7
local d = self.Drawable
local r = self.Rect
@@ -282,9 +282,9 @@ function Handle:draw()
local w = r[3] - r[1] + 1
local n = floor(w * RATIO / OFFS)
if n > 0 then
- local x = r[1] + floor((w - n * OFFS) / 2)
+ local x = r[1] + floor((w - (n - 1) * OFFS) / 2)
local y = r[2] + floor((r[4] - r[2] + 1) / 2)
- for i = 0, n - 1 do
+ for i = 1, n do
d:drawLine(x - 2, y, x, y - 2, p1)
d:drawLine(x, y + 2, x + 2, y, p2)
x = x + OFFS
@@ -295,8 +295,8 @@ function Handle:draw()
local n = floor(h * RATIO / OFFS)
if n > 0 then
local x = r[1] + floor((r[3] - r[1] + 1) / 2)
- local y = r[2] + floor((h - n * OFFS) / 2)
- for i = 0, n - 1 do
+ local y = r[2] + floor((h - (n - 1) * OFFS) / 2)
+ for i = 1, n do
d:drawLine(x - 2, y, x, y - 2, p1)
d:drawLine(x, y + 2, x + 2, y, p2)
y = y + OFFS
diff -r 50bd09ec3d5b -r 5f3b608c59ea tek/class/ui/list.lua
--- a/tek/class/ui/list.lua Tue May 06 15:27:26 2008 +0200
+++ b/tek/class/ui/list.lua Tue May 06 19:20:05 2008 +0200
@@ -7,6 +7,7 @@
local db = require "tek.lib.debug"
local ui = require "tek.lib.ui"
+local Border = ui.Border
local Gadget = ui.Gadget
local concat = table.concat
@@ -17,9 +18,10 @@ local overlap = ui.Region.overlapCoords
local overlap = ui.Region.overlapCoords
local remove = table.remove
local type = type
+local unpack = unpack
module("tek.class.ui.list", tek.class.ui.gadget)
-_VERSION = "List 2.3"
+_VERSION = "List 2.4"
local List = _M
-------------------------------------------------------------------------------
@@ -51,6 +53,11 @@ function List.init(self)
self.Height = false
self.CursorLine = self.CursorLine or 0
+ self.CursorBorder = false
+ self.CursorBorderStyle = false
+ self.CursorBorderClass = false
+
More information about the tekui-devel
mailing list