Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(286)

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/widget/RoundedIconGenerator.java

Issue 972303002: Fix RoundedIconGenerator font scaling. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/preferences/website/WebsitePreference.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/widget/RoundedIconGenerator.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/widget/RoundedIconGenerator.java b/chrome/android/java/src/org/chromium/chrome/browser/widget/RoundedIconGenerator.java
index f615ebf72082f9fbd346e91431a250b0d8d06b81..e60b2f15b9db3b35a6e4831cf9ba5d919605b49b 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/widget/RoundedIconGenerator.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/widget/RoundedIconGenerator.java
@@ -14,7 +14,6 @@ import android.graphics.RectF;
import android.text.TextPaint;
import android.text.TextUtils;
import android.util.Log;
-import android.util.TypedValue;
import org.chromium.base.VisibleForTesting;
import org.chromium.chrome.browser.UrlConstants;
@@ -51,17 +50,16 @@ public class RoundedIconGenerator {
* @param iconWidthDp The width of the generated icon in dp.
* @param iconHeightDp The height of the generated icon in dp.
* @param cornerRadiusDp The radius of the corners in the icon in dp.
- * @param backgroundColor Color at which the rounded rectangle should be drawn.
- * @param textSizeSp Size at which the text should be drawn in dp.
+ * @param backgroundColor Color with which the rounded rectangle should be drawn.
+ * @param textSizeDp Size at which the text should be drawn in dp.
*/
public RoundedIconGenerator(Context context, int iconWidthDp, int iconHeightDp,
- int cornerRadiusDp, int backgroundColor, int textSizeSp) {
+ int cornerRadiusDp, int backgroundColor, int textSizeDp) {
this((int) (context.getResources().getDisplayMetrics().density * iconWidthDp),
(int) (context.getResources().getDisplayMetrics().density * iconHeightDp),
(int) (context.getResources().getDisplayMetrics().density * cornerRadiusDp),
backgroundColor,
- TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_SP, textSizeSp,
- context.getResources().getDisplayMetrics()));
+ (int) (context.getResources().getDisplayMetrics().density * textSizeDp));
}
/**
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/preferences/website/WebsitePreference.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698