mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-28 15:56:49 +00:00
Updating the paddings in folder cell
> Updating overall padding for the cell and adding drawable padding > Ensuring that the folder cell is always rendered properly based on available vertical space Bug: 30605958 Change-Id: I8ceb9fea5a25052b0d7461f52edca0e6a33fa085
This commit is contained in:
@@ -686,11 +686,11 @@ public final class Utilities {
|
||||
/**
|
||||
* Calculates the height of a given string at a specific text size.
|
||||
*/
|
||||
public static float calculateTextHeight(float textSizePx) {
|
||||
public static int calculateTextHeight(float textSizePx) {
|
||||
Paint p = new Paint();
|
||||
p.setTextSize(textSizePx);
|
||||
Paint.FontMetrics fm = p.getFontMetrics();
|
||||
return -fm.top + fm.bottom;
|
||||
return (int) Math.ceil(fm.bottom - fm.top);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user