mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-17 19:09:31 +02:00
Android: Adds a work around for the too small text measuring
git-svn-id: trunk@34401 -
This commit is contained in:
parent
d84fb4ec3e
commit
eed671d9e8
@ -161,6 +161,8 @@ public class LCLActivity extends Activity
|
||||
localpaint.setTextSize(lcltextsize);
|
||||
localpaint.getTextBounds(lcltext, 0, lcltext.length(), localbounds);
|
||||
lclwidth = localbounds.width();
|
||||
// Painter.getTextBounds consistently gives us a too small size, so work around that
|
||||
lclwidth = lclwidth + (3 * lcltextsize) / 16;
|
||||
// Don't use just localbounds.height() from the source text
|
||||
// because it will calculate the minimum necessary height,
|
||||
// but we can't easily use that to draw text because it draws relative to the baseline
|
||||
|
Loading…
Reference in New Issue
Block a user