From 309e45ea03063c86368e3ae36008b829ae2f28b0 Mon Sep 17 00:00:00 2001 From: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com> Date: Wed, 15 Nov 2023 19:49:26 +0200 Subject: [PATCH] Fix vertical alignment issues with rolling number. --- .../returnyoutubedislike/ReturnYouTubeDislike.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/app/revanced/integrations/returnyoutubedislike/ReturnYouTubeDislike.java b/app/src/main/java/app/revanced/integrations/returnyoutubedislike/ReturnYouTubeDislike.java index 420c24bf4e..ac28109b89 100644 --- a/app/src/main/java/app/revanced/integrations/returnyoutubedislike/ReturnYouTubeDislike.java +++ b/app/src/main/java/app/revanced/integrations/returnyoutubedislike/ReturnYouTubeDislike.java @@ -122,10 +122,10 @@ public enum Vote { DisplayMetrics dp = Objects.requireNonNull(ReVancedUtils.getContext()).getResources().getDisplayMetrics(); leftSeparatorBounds = new Rect(0, 0, - (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 1.2f, dp), - (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 18, dp)); + (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_SP, 1.2f, dp), + (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_SP, 18, dp)); final int middleSeparatorSize = - (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 3.7f, dp); + (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_SP, 3.7f, dp); middleSeparatorBounds = new Rect(0, 0, middleSeparatorSize, middleSeparatorSize); } @@ -575,6 +575,7 @@ public void setUserVote(@NonNull Vote vote) { class VerticallyCenteredImageSpan extends ImageSpan { public VerticallyCenteredImageSpan(Drawable drawable) { super(drawable); +// super(drawable, DynamicDrawableSpan.ALIGN_CENTER); } @Override