{
var res = new Gtk.CellRendererText();
res.font_desc = get_style().font_desc;
+ res.ypad = 0;
return res;
}
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)
+ renderers[0].get_size(this, null, null, null, null, out cell_area.height);
+ if (label_cache.length * cell_area.height >= allocation.height)
{
for (int y = 0; y < allocation.height; ++y)
{
0);
}
} else {
- int count = int.min(allocation.height/2, label_cache.length);
- for (int y = 0; y < count; ++y)
+ int count = int.min(allocation.height/(2*cell_area.height), label_cache.length);
+ for (int idx = 0; idx < count; ++idx)
{
- cell_area.y = y;
- renderers[0].text = label_cache[y];
+ cell_area.y = idx * cell_area.height;
+ renderers[0].text = label_cache[idx];
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];
+ cell_area.y = allocation.height-cell_area.y;
+ renderers[0].text = label_cache[label_cache.length-idx];
renderers[0].render((Gdk.Window*)drawable, this,
cell_area,
cell_area,