mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
fix(android): font icons had incorrect fallback size (#9914)
This commit is contained in:
committed by
Nathan Walker
parent
b619c3a7f1
commit
e8bed44f5b
@@ -187,14 +187,12 @@ export class ImageSource implements ImageSourceDefinition {
|
||||
paint.setColor(color.android);
|
||||
}
|
||||
|
||||
let scaledFontSize = layout.toDevicePixels(font.fontSize);
|
||||
if (!scaledFontSize) {
|
||||
// TODO: Consider making 36 font size as default for optimal look on TabView and ActionBar
|
||||
scaledFontSize = layout.toDevicePixels(paint.getTextSize());
|
||||
// TODO: Consider making 36 font size as default for optimal look on TabView and ActionBar
|
||||
const scaledFontSize = layout.toDevicePixels(font.fontSize);
|
||||
if (scaledFontSize) {
|
||||
paint.setTextSize(scaledFontSize);
|
||||
}
|
||||
|
||||
paint.setTextSize(scaledFontSize);
|
||||
|
||||
const textBounds = new android.graphics.Rect();
|
||||
paint.getTextBounds(source, 0, source.length, textBounds);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user