if (is_fisheye)
{
- focus_locked = !focus_layout_needed && x < allocation.width/2 && y >= focus_area_start+focus_info[0].y && y < focus_area_start+focus_info[focus_end - focus_first].y;
+ focus_locked = !focus_layout_needed && x < allocation.width/3 && y >= focus_area_start+focus_info[0].y && y < focus_area_start+focus_info[focus_end - focus_first].y;
- if (y < focus_area_start+focus_info[0].y || y >= focus_area_start+focus_info[focus_end - focus_first].y)
+ if (!focus_locked || y < focus_area_start+focus_info[0].y || y >= focus_area_start+focus_info[focus_end - focus_first].y)
cur_el = y * (label_cache.length+1) / allocation.height;
else
for (int idx = 0; idx < focus_info.length; ++idx)
// Focus movement area
drawable.draw_rectangle(style.bg_gc[Gtk.StateType.INSENSITIVE], true,
- allocation.width/2, 0, allocation.width, allocation.height);
+ allocation.width/3, 0, allocation.width/3, allocation.height);
for (int y = 0; y < allocation.height/2 - 30; y += 30)
{
Gtk.paint_arrow(style, (Gdk.Window*)drawable, Gtk.StateType.INSENSITIVE, Gtk.ShadowType.NONE,
null, this, null, Gtk.ArrowType.UP, false,
- allocation.width/2, y, allocation.width/2, 10);
+ allocation.width/3, y, allocation.width/3, 10);
Gtk.paint_arrow(style, (Gdk.Window*)drawable, Gtk.StateType.INSENSITIVE, Gtk.ShadowType.NONE,
null, this, null, Gtk.ArrowType.DOWN, false,
- allocation.width/2, allocation.height-y-30, allocation.width/2, 10);
+ allocation.width/3, allocation.height-y-30, allocation.width/3, 10);
}
// Draw tiny labels
layout.set_alignment(Pango.Alignment.RIGHT);
layout.set_width(allocation.width*Pango.SCALE/3);
layout.set_height(0);
-//stderr.printf("HEIGHT %d+%d = %d\n", lr.y, lr.height, lr.y + lr.height);
- //layout.set_wrap(Pango.WrapMode.
layout.set_ellipsize(Pango.EllipsizeMode.END);
int last_covered = 0;
for (weak List<PrefixInfo> i = prefixes; i != null; i = i.next)
{
-stderr.printf("DRAW %s at %d lc %d\n", i.data.prefix, i.data.layout_pos, last_covered);
if (i.data.layout_pos < last_covered)
- {
i.data.layout_pos = last_covered;
- }
layout.set_text(i.data.prefix, int.max(10, (int)i.data.pfx_len));
- Gtk.paint_layout(style, (Gdk.Window*)drawable, Gtk.StateType.NORMAL, true, null, this, null, allocation.width*2/3, i.data.layout_pos, layout);
+ Gtk.paint_layout(style, (Gdk.Window*)drawable, Gtk.StateType.INSENSITIVE, true, null, this, null, allocation.width*2/3, i.data.layout_pos, layout);
last_covered = i.data.layout_pos + label_height;
}
}
{
// Focus lock area
drawable.draw_rectangle(style.bg_gc[Gtk.StateType.ACTIVE], true,
- 0, focus_area_start + focus_info[0].y, allocation.width/2, focus_info[focus_end - focus_first].y);
+ 0, focus_area_start + focus_info[0].y, allocation.width/3, focus_info[focus_end - focus_first].y);
// Paint items around focus
Gdk.Rectangle cell_area = Gdk.Rectangle();
cell_area.x = 0;
- cell_area.width = allocation.width;
+ cell_area.width = expose_area.width;
for (int idx = 0; idx < focus_info.length; ++idx)
{
var renderer = renderers[focus_info[idx].renderer];
{
rflags |= Gtk.CellRendererState.SELECTED | Gtk.CellRendererState.FOCUSED;
drawable.draw_rectangle(style.bg_gc[Gtk.StateType.SELECTED], true,
- cell_area.x, cell_area.y, cell_area.width, cell_area.height);
+ cell_area.x, cell_area.y, allocation.width, cell_area.height);
}
renderer.text = label_cache[idx + focus_first];