+ protected void focus_layout()
+ {
+ if (!is_fisheye || label_cache.length == 0)
+ {
+ focus_first = 0;
+ focus_end = 0;
+ focus_layout_needed = false;
+ return;
+ }
+
+ focus_first = cur_el - _focus_size/2 - steps;
+ if (focus_first < 0) focus_first = 0;
+ if (focus_first + focus_info.length > label_cache.length)
+ focus_first = label_cache.length - focus_info.length;
+
+ /*
+ int full_focus_start = anchor_y - (_focus_size/2) * max_renderer_size;
+ int full_focus_end = anchor_y + (_focus_size/2) * max_renderer_size;
+ int steps_start = full_focus_start - focus_step_size;
+ */
+
+ int cur_pos = 0;
+ int cur_idx = 0;
+ int focus_area_pre = 0;
+ while (cur_pos < allocation.height && cur_idx < focus_info.length)
+ {
+ if (focus_first + cur_idx == cur_el)
+ focus_area_pre = cur_pos;
+ focus_info[cur_idx].y = cur_pos;
+ focus_info[cur_idx].renderer = el_renderer(focus_first + cur_idx);
+// stderr.printf("LAYOUT %d+[0-%d-%d] item %d/%d: pos %d rend %d rsz %d\n",
+// focus_first, cur_idx, focus_info.length, focus_first + cur_idx, label_cache.length,
+// cur_pos, focus_info[cur_idx].renderer, renderer_sizes[focus_info[cur_idx].renderer]);
+ cur_pos += renderer_sizes[focus_info[cur_idx].renderer];
+ ++cur_idx;
+ }
+
+ focus_info[cur_idx].y = cur_pos;
+ focus_info[cur_idx].renderer = 0;
+ focus_end = focus_first + cur_idx;
+
+ int anchor_y = cur_el * allocation.height / (label_cache.length+1);
+ int focus_area_size = cur_pos;
+
+ focus_area_start = anchor_y - focus_area_pre;
+ if (focus_area_start < 0) focus_area_start = 0;
+ if (focus_area_start + focus_area_size > allocation.height)
+ focus_area_start = allocation.height - focus_area_size;
+
+// stderr.printf("FA [0 [%d+%d=%d] %d]\n", focus_area_start, focus_area_size, focus_area_start+focus_area_size, allocation.height);
+
+ focus_layout_needed = false;
+ }
+
+ protected void draw_background(Gdk.Drawable drawable)
+ {
+ Gtk.Style style = get_style();