ToastFreeware
/
gregoa
/
zavai.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
80d5019
)
Apply focus+context to avoid drawing items that are away from the current one
author
Enrico Zini
<enrico@enricozini.org>
Tue, 8 Dec 2009 15:44:07 +0000
(15:44 +0000)
committer
Enrico Zini
<enrico@enricozini.org>
Tue, 8 Dec 2009 15:44:07 +0000
(15:44 +0000)
src/fisheye.vala
patch
|
blob
|
history
diff --git
a/src/fisheye.vala
b/src/fisheye.vala
index 1d844d9f0806fdb6cde7098efdcfe5eb59fb429a..24fefeb30e91e6a380cdf570af3ea4dc89326027 100644
(file)
--- a/
src/fisheye.vala
+++ b/
src/fisheye.vala
@@
-107,7
+107,9
@@
public class FisheyeList : Gtk.DrawingArea
context.set_line_width (0.001);
context.select_font_face("Sans", Cairo.FontSlant.NORMAL, Cairo.FontWeight.NORMAL);
- for (int idx = 0; idx < list.length; ++idx)
+ int start = cur_el > 20 ? cur_el-20 : 0;
+ int end = cur_el < list.length - 20 ? cur_el + 20 : list.length;
+ for (int idx = start; idx < end; ++idx)
{
double posprev = idx == 0 ? 0 : el_y(idx-1);
double pos = el_y(idx);