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

Commit a6c9e34b authored by Lucas Dupin's avatar Lucas Dupin
Browse files

Shorter separator

Shorter separator on keyguard slice

Test: visual
Bug: 64155983
Change-Id: I86b56fec780b531c9c3064e7147e59add6b9e4a3
parent 03e7ec20
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -333,6 +333,7 @@ public class KeyguardSliceView extends LinearLayout implements View.OnClickListe
     */
    private class KeyguardSliceButton extends Button {

        private static final float SEPARATOR_HEIGHT = 0.7f;
        private final Paint mPaint;
        private boolean mHasDivider;

@@ -369,7 +370,9 @@ public class KeyguardSliceView extends LinearLayout implements View.OnClickListe
            super.onDraw(canvas);
            if (mHasDivider) {
                final int lineX = getLayoutDirection() == LAYOUT_DIRECTION_RTL ? 0 : getWidth();
                canvas.drawLine(lineX, 0, lineX, getHeight(), mPaint);
                final int height = (int) (getHeight() * SEPARATOR_HEIGHT);
                final int startY = getHeight() / 2 - height / 2;
                canvas.drawLine(lineX, startY, lineX, startY + height, mPaint);
            }
        }
    }