From a605449390de7737e718e6d10574e5581cf757e3 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Thu, 22 Oct 2026 11:55:25 +0200 Subject: Do not clip the focus zoom of icon buttons The scaled icon draws into the button padding, which was clipped, so the full-bleed app logo lost its edges. The current-view mark moves down 2dp to clear the zoom. Co-Authored-By: Claude Opus 5.5 --- app/src/main/java/mygram/droid/Ui.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'app/src/main/java/mygram/droid') diff --git a/app/src/main/java/mygram/droid/Ui.java b/app/src/main/java/mygram/droid/Ui.java index ab6db38..234dad3 100644 --- a/app/src/main/java/mygram/droid/Ui.java +++ b/app/src/main/java/mygram/droid/Ui.java @@ -111,6 +111,7 @@ final class Ui { box.setGravity(Gravity.CENTER_HORIZONTAL); int p = dp(c, 10); box.setPadding(p, p, p, p / 2); + box.setClipToPadding(false); // the focus zoom draws into the padding; the full-bleed logo was cut ImageView image = new ImageView(c); image.setImageResource(icon); image.setContentDescription(label); @@ -124,7 +125,7 @@ final class Ui { mark.setBackground(bar); mark.setVisibility(View.INVISIBLE); LinearLayout.LayoutParams mp = new LinearLayout.LayoutParams(dp(c, 20), dp(c, 3)); - mp.topMargin = dp(c, 6); + mp.topMargin = dp(c, 8); // clears the 1.25 focus zoom box.addView(mark, mp); TextView t = text(c, label, 12); t.setSingleLine(true); -- cgit v1.2.3