X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fentry.cpp;h=6d13ccdd0377eaaff11b29db0c27981d5b9cacc0;hb=7c1b1b44dc3726d6cdb4681f9d44189eb4102a5a;hp=70321dc5a68cf029128f07c52e9b06f44ea38f91;hpb=8a911be6fd3c2840befcef44ac7b24969563d34e;p=libs%2Fgltk.git diff --git a/source/entry.cpp b/source/entry.cpp index 70321dc..6d13ccd 100644 --- a/source/entry.cpp +++ b/source/entry.cpp @@ -440,11 +440,7 @@ void Entry::check_view_range() if(!multiline || !text_part) return; - float font_size = style->get_font_size(); - unsigned line_spacing = static_cast(font_size*6/5); - - const Sides &margin = text_part->get_margin(); - visible_rows = max((geom.h-margin.top-margin.bottom)/line_spacing, 1U); + visible_rows = text.get_visible_lines(*text_part, geom, 0); unsigned row, col; text.offset_to_coords(edit_pos, row, col);