Ticket #619: patch-bug#619.diff

File patch-bug#619.diff, 689 bytes (added by cl21, 17 years ago)

New patch

  • src/kits/interface/ListItem.cpp

     
    346346    font_height fheight;
    347347    font->GetHeight(&fheight);
    348348   
    349     fBaselineOffset = fheight.ascent + fheight.leading;
    350     SetHeight((float)ceil(fheight.ascent + fheight.descent +
    351         fheight.leading) + 4);
     349    fBaselineOffset = ceilf(fheight.ascent) + ceilf(fheight.leading / 2) + 2 + 1;
     350        // Text is drawn one pixel above the logical baseline, thus offset +1
     351
     352    SetHeight(ceilf(fheight.ascent) + ceilf(fheight.descent)
     353        + 2 * ceilf(fheight.leading / 2) + 4);
    352354}
    353355
    354356