[tekui-devel] tekui: Gauges with vertical orientation are now running from bot...
Timm S. Mueller
tmueller at schulze-mueller.de
Wed Apr 29 22:59:51 CEST 2009
details: http://hg.teklib.org/tekui/rev/029ed6b71157
changeset: 104:029ed6b71157
user: Timm S. Mueller <tmueller at schulze-mueller.de>
date: Wed Apr 29 22:59:18 2009 +0200
description:
Gauges with vertical orientation are now running from bottom to top
diffs (43 lines):
diff -r ba779ec71529 -r 029ed6b71157 doc/manual.html
--- a/doc/manual.html Wed Apr 29 18:50:31 2009 +0200
+++ b/doc/manual.html Wed Apr 29 22:59:18 2009 +0200
@@ -4607,7 +4607,7 @@
</p>
<hr class="page-break" />
</div>
- <div class="node"><h2><a name="tek.ui.class.gauge" id="tek.ui.class.gauge">Gauge (v4.4)</a></h2>
+ <div class="node"><h2><a name="tek.ui.class.gauge" id="tek.ui.class.gauge">Gauge (v4.5)</a></h2>
<div class="definition"><dfn>LINEAGE</dfn>
<blockquote>
<p>
@@ -7311,7 +7311,7 @@
</p>
<hr />
<p>
- Document generated on Wed Apr 29 18:47:28 2009
+ Document generated on Wed Apr 29 22:58:00 2009
</p>
</div>
</body>
diff -r ba779ec71529 -r 029ed6b71157 tek/ui/class/gauge.lua
--- a/tek/ui/class/gauge.lua Wed Apr 29 18:50:31 2009 +0200
+++ b/tek/ui/class/gauge.lua Wed Apr 29 22:59:18 2009 +0200
@@ -45,7 +45,7 @@
local unpack = unpack
module("tek.ui.class.gauge", tek.ui.class.numeric)
-_VERSION = "Gauge 4.4"
+_VERSION = "Gauge 4.5"
-------------------------------------------------------------------------------
-- Gauge:
@@ -147,7 +147,8 @@
x1 = min(x1, x0 + floor((self.Value - self.Min) * w / r) + km[1])
else
local h = y1 - y0 - km[2] + 1
- y1 = min(y1, y0 + floor((self.Value - self.Min) * h / r) + km[2])
+ y0 = max(y0,
+ y1 - floor((self.Value - self.Min) * h / r) - km[2])
end
return x0 - m[1], y0 - m[2], x1 + m[3], y1 + m[4]
end
More information about the tekui-devel
mailing list