X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flist.cpp;h=924cfb55d37b68f99e2091c844db7e91aafd6b90;hb=3db68f2604b657e79f1b2b317c19c41c2d5a985b;hp=04adb399cc2adf237b3384384ac807ea5b6b5ff3;hpb=a9d04a73afcdf40c33d889090d303117b7fd3a7d;p=libs%2Fgltk.git diff --git a/source/list.cpp b/source/list.cpp index 04adb39..924cfb5 100644 --- a/source/list.cpp +++ b/source/list.cpp @@ -108,7 +108,7 @@ void List::button_press(int x, int y, unsigned btn) else if(btn==1) { const GL::Font *const font=style->get_font(); - const unsigned row_height=static_cast(font->get_default_size()); + const unsigned row_height=static_cast((font->get_ascent()-font->get_descent())*font->get_default_size()); if(items_part) y+=items_part->get_margin().top; @@ -149,7 +149,7 @@ void List::render_special(const Part &part) const const GL::Font *const font=style->get_font(); const float font_size=font->get_default_size(); const GL::Color &color=style->get_font_color(); - const unsigned row_height=static_cast(font_size); + const unsigned row_height=static_cast((font->get_ascent()-font->get_descent())*font_size); const Sides &margin=part.get_margin(); Geometry pgeom=geom; @@ -180,7 +180,7 @@ void List::render_special(const Part &part) const { const GL::Font *const font=style->get_font(); const float font_size=font->get_default_size(); - const unsigned row_height=static_cast(font_size); + const unsigned row_height=static_cast((font->get_ascent()-font->get_descent())*font_size); const Sides &margin=part.get_margin(); Geometry pgeom=geom;