Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b773a2cf authored by TheScarastic's avatar TheScarastic Committed by Mohammed Althaf T
Browse files

feat: Fix folder name alignment

parent bf17ac4c
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@ import android.graphics.PointF;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.util.Log;
import android.util.Property;
import android.view.LayoutInflater;
import android.view.MotionEvent;
@@ -219,7 +220,7 @@ public class FolderIcon extends FrameLayout implements FolderListener, IconLabel
            int cellHeightPx = icon.mFolderName.getIconSize() + icon.mFolderName.getCompoundDrawablePadding() +
                    (int) Math.ceil(fm.bottom - fm.top);

            lp.topMargin = grid.iconSizePx + (grid.getCellSize().y - cellHeightPx) / 2;
            lp.topMargin = grid.iconSizePx + Math.min(((grid.getCellSize().y - cellHeightPx) / 2), 0);
            icon.mFolderName.setIncludeFontPadding(false);
        } else {
            lp.topMargin = grid.iconSizePx + grid.iconDrawablePaddingPx;