Mholloway has submitted this change and it was merged.
Change subject: Slightly decrease minimum text size on Share a Fact cards.
......................................................................
Slightly decrease minimum text size on Share a Fact cards.
This patch slightly decreases the minimum text size on Share a Fact cards.
This allows medium-length quotes to be fit on the cards.
Also increased the top padding to be similar to the left/right padding per
Vibha's request.
It's not exactly the same value because there is some ascender height space
above the cap height.
Bug: T96398
Change-Id: Ia090a6a4de50c653c3abc189a00ba0c30bb310b1
---
M wikipedia/src/main/java/org/wikipedia/page/snippet/SnippetImage.java
1 file changed, 3 insertions(+), 2 deletions(-)
Approvals:
Mholloway: Looks good to me, approved
diff --git
a/wikipedia/src/main/java/org/wikipedia/page/snippet/SnippetImage.java
b/wikipedia/src/main/java/org/wikipedia/page/snippet/SnippetImage.java
index 93b0a0a..09281f1 100644
--- a/wikipedia/src/main/java/org/wikipedia/page/snippet/SnippetImage.java
+++ b/wikipedia/src/main/java/org/wikipedia/page/snippet/SnippetImage.java
@@ -34,6 +34,7 @@
private static final int HEIGHT = 360;
private static final int BOTTOM_PADDING = 25;
private static final int HORIZONTAL_PADDING = 30;
+ private static final int TOP_PADDING = 22;
private static final int TEXT_WIDTH = WIDTH - 2 * HORIZONTAL_PADDING;
private static final int DESCRIPTION_WIDTH = 360;
private static final float SPACING_MULTIPLIER = 1.0f;
@@ -112,11 +113,11 @@
}
private Layout drawTextSnippet(Canvas canvas, CharSequence textSnippet) {
- final int top = 8;
+ final int top = TOP_PADDING;
final int maxHeight = 225;
final int maxLines = 5;
final float maxFontSize = 195.0f;
- final float minFontSize = 38.0f;
+ final float minFontSize = 32.0f;
TextPaint textPaint = new TextPaint();
textPaint.setAntiAlias(true);
--
To view, visit https://gerrit.wikimedia.org/r/204835
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia090a6a4de50c653c3abc189a00ba0c30bb310b1
Gerrit-PatchSet: 4
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Deskana <[email protected]>
Gerrit-Reviewer: BearND <[email protected]>
Gerrit-Reviewer: Brion VIBBER <[email protected]>
Gerrit-Reviewer: Dbrant <[email protected]>
Gerrit-Reviewer: Mholloway <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits