Enlightenment CVS committal
Author : handyande
Project : misc
Module : engage
Dir : misc/engage/src
Modified Files:
dock.c tray.c window.c
Log Message:
Fix system tray area a bit
remove unneeded render calls
speed up some maths
===================================================================
RCS file: /cvsroot/enlightenment/misc/engage/src/dock.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -3 -r1.16 -r1.17
--- dock.c 11 Oct 2004 10:13:42 -0000 1.16
+++ dock.c 28 Nov 2004 16:56:29 -0000 1.17
@@ -86,7 +86,7 @@
if (dock.sysicons)
width += options.spacing + 1.0; // another spacer
}
- width += tray_width + 8;
+ width += 3; /* expand under tray */
#define POSITION(__icons) \
{ \
@@ -115,7 +115,6 @@
dock.left_pos = 0.5 * (options.width - width) - 1.0;
dock.right_pos = 0.5 * (options.width - width) + width + 1.0;
- od_tray_move(dock.right_pos - tray_width - 2);
need_redraw = true;
}
@@ -187,17 +186,25 @@
options.height - options.size - ARROW_SPACE_DOUBLE);
}
- od_tray_move(dock.right_end - tray_width - 2);
+ od_tray_move(dock.right_end - 1);
+ need_redraw = false;
}
void
zoom_function(double d, double *zoom, double *disp)
{
- double range = 2.5;
- double f = 1.5;
- double x = d / range;
- double zoom_factor;
+ double range, f, x, zoom_factor;
+ double ff, sqrt_ffxx, sqrt_ff_1;
+
+ range = 2.5;
+ f = 1.5;
+ x = d / range;
+
+ /* some more vars to save computing things over and over */
+ ff = f * f;
+ sqrt_ffxx = sqrt(ff - x * x);
+ sqrt_ff_1 = sqrt(ff - 1.0);
if (options.zoom)
zoom_factor = options.zoomfactor;
@@ -205,23 +212,22 @@
zoom_factor = 1;
if (d > -range && d < range) {
*zoom = (dock.zoom - 1.0) * (zoom_factor - 1.0) *
- ((sqrt(f * f - 1.0) - sqrt(f * f - x * x)) / (sqrt(f * f - 1.0) - f)
+ ((sqrt_ff_1 - sqrt_ffxx) / (sqrt_ff_1 - f)
)
+ 1.0;
*disp = (options.size + options.spacing) *
((dock.zoom - 1.0) * (zoom_factor - 1.0) *
(range *
- (x * (2 * sqrt(f * f - 1.0) - sqrt(f * f - x * x)) -
- f * f * atan(x / sqrt(f * f - x * x))) / (2.0 * (sqrt(f * f - 1.0) -
- f))
+ (x * (2 * sqrt_ff_1 - sqrt_ffxx) -
+ ff * atan(x / sqrt_ffxx)) / (2.0 * (sqrt_ff_1 - f))
)
+ d);
} else {
*zoom = 1.0;
*disp = (options.size + options.spacing) *
((dock.zoom - 1.0) * (zoom_factor - 1.0) *
- (range * (sqrt(f * f - 1.0) - f * f * atan(1.0 / sqrt(f * f - 1.0))) /
- (2.0 * (sqrt(f * f - 1.0) - f))
+ (range * (sqrt_ff_1 - ff * atan(1.0 / sqrt_ff_1)) /
+ (2.0 * (sqrt_ff_1 - f))
)
+ range + fabs(d) - range);
if (d < 0.0)
===================================================================
RCS file: /cvsroot/enlightenment/misc/engage/src/tray.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- tray.c 21 Sep 2004 22:09:32 -0000 1.9
+++ tray.c 28 Nov 2004 16:56:30 -0000 1.10
@@ -37,7 +37,8 @@
int oddflag;
tray_width = ((tray_count + 1) / 2) * 24;
- ecore_x_window_resize(tray_container, tray_width, 48);
+ ecore_x_window_resize(tray_container, tray_width, options.height -
+ options.size - ARROW_SPACE_DOUBLE - 1);
tmp = tray_list;
xpos = 0;
@@ -147,7 +148,8 @@
if (xx == tray_x)
return;
- ecore_x_window_move(tray_container, xx, options.height - 48);
+ ecore_x_window_move(tray_container, xx, options.height - options.size
+ - ARROW_SPACE_DOUBLE + 1);
tray_x = xx;
}
===================================================================
RCS file: /cvsroot/enlightenment/misc/engage/src/window.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -3 -r1.25 -r1.26
--- window.c 14 Oct 2004 22:38:59 -0000 1.25
+++ window.c 28 Nov 2004 16:56:31 -0000 1.26
@@ -54,6 +54,7 @@
handle_pre_render_cb(Ecore_Evas * _ee)
{
edje_thaw();
+ if (need_redraw)
od_dock_redraw(_ee);
}
static void
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs