expose_area.width = allocation.width;
expose_area.height = allocation.height;
- stderr.printf("BG %d %d\n", label_cache.length, allocation.height);
+ Gdk.Rectangle cell_area = Gdk.Rectangle();
+ cell_area.x = 0;
+ cell_area.width = allocation.width;
+ cell_area.height = 1;
if (label_cache.length >= allocation.height)
{
- stderr.printf("LABELS\n");
- Gdk.Rectangle cell_area = Gdk.Rectangle();
- cell_area.x = 0;
- cell_area.width = allocation.width;
- cell_area.height = 1;
for (int y = 0; y < allocation.height; ++y)
{
int idx = y * label_cache.length / allocation.height;
expose_area,
0);
}
+ } else {
+ int count = int.min(allocation.height/2, label_cache.length);
+ for (int y = 0; y < count; ++y)
+ {
+ cell_area.y = y;
+ renderers[0].text = label_cache[y];
+ renderers[0].render((Gdk.Window*)drawable, this,
+ cell_area,
+ cell_area,
+ expose_area,
+ 0);
+
+ cell_area.y = allocation.height-y;
+ renderers[0].text = label_cache[label_cache.length-y];
+ renderers[0].render((Gdk.Window*)drawable, this,
+ cell_area,
+ cell_area,
+ expose_area,
+ 0);
+ }
}
}