aboutsummaryrefslogtreecommitdiffstats
path: root/app/src/main/java
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-10-22 11:55:25 +0200
committerDanilo M. <danix@danix.xyz>2026-10-22 11:55:25 +0200
commita605449390de7737e718e6d10574e5581cf757e3 (patch)
tree3a0aad0b7af1a6b53b57b4c4c03386bb2c8603ef /app/src/main/java
parent01a5f2a67a43f268e2807e29e8664e6bbc5d655e (diff)
downloadmygram-droid-a605449390de7737e718e6d10574e5581cf757e3.tar.gz
mygram-droid-a605449390de7737e718e6d10574e5581cf757e3.zip
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 <noreply@anthropic.com>
Diffstat (limited to 'app/src/main/java')
-rw-r--r--app/src/main/java/mygram/droid/Ui.java3
1 files changed, 2 insertions, 1 deletions
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);