multiline(false),
edit_pos(0),
first_row(0),
+ visible_rows(1),
text_part(0),
slider(0)
{
unsigned line_spacing = static_cast<unsigned>(font_size*6/5);
const Sides &margin = text_part->get_margin();
- visible_rows = (geom.h-margin.top-margin.bottom)/line_spacing;
+ visible_rows = max((geom.h-margin.top-margin.bottom)/line_spacing, 1U);
unsigned row, col;
text.offset_to_coords(edit_pos, row, col);