File: hide.patch

package info (click to toggle)
wbar 1.3.3%2Bdfsg2-1
  • links: PTS
  • area: main
  • in suites: squeeze, wheezy
  • size: 224 kB
  • ctags: 201
  • sloc: cpp: 1,307; sh: 102; makefile: 70
file content (35 lines) | stat: -rw-r--r-- 1,177 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
Index: Bar.cc
===================================================================
RCS file: /mnt/back/repository/c/wbar/Bar.cc,v
retrieving revision 1.9
diff -u -r1.9 Bar.cc
--- Bar.cc	4 Aug 2007 00:24:34 -0000	1.9
+++ Bar.cc	12 Sep 2007 01:41:00 -0000
@@ -413,9 +413,10 @@
     int t=0, anim_time = 80;
     struct timeval tv0, tv;
 
-    if(inverse)
+    if(inverse) // compress
 	for(size_t i = 0; i<icons.size(); i++){
 	    cur_ic = icons[i];
+	    cur_ic->oy += icon_size;
 	    cur_ic->vx = -(cur_ic->x - cur_ic->ox) / (float)anim_time;
 	    cur_ic->vy = -(cur_ic->y - cur_ic->oy) / (float)anim_time;
 	    cur_ic->vs = -(cur_ic->size - icon_size) / (float)anim_time;
@@ -427,6 +428,7 @@
     else
 	for(size_t i = 0; i<icons.size(); i++){
 	    cur_ic = icons[i];
+	    cur_ic->y -= icon_size;
 	    cur_ic->vx = (cur_ic->x - cur_ic->ox) / (float)anim_time;
 	    cur_ic->vy = (cur_ic->y - cur_ic->oy) / (float)anim_time;
 	    cur_ic->vs = (cur_ic->size - icon_size) / (float)anim_time;
@@ -434,6 +436,7 @@
 	    cur_ic->bx = cur_ic->ox;
 	    cur_ic->by = cur_ic->oy;
 	    cur_ic->bs = icon_size;
+	    cur_ic->oy -= icon_size;
 	}
 
     gettimeofday(&tv0, NULL);