mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
fix(android): line-height (#8751)
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
"main": "index",
|
||||
"types": "index.d.ts",
|
||||
"description": "NativeScript Core Modules",
|
||||
"version": "6.5.12",
|
||||
"version": "6.5.13",
|
||||
"homepage": "https://www.nativescript.org",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
||||
@@ -334,11 +334,10 @@ export class TextBase extends TextBaseCommon {
|
||||
}
|
||||
|
||||
[lineHeightProperty.getDefault](): number {
|
||||
return this.nativeTextViewProtected.getLineHeight() / layout.getDisplayDensity();
|
||||
return this.nativeView.getLineSpacingExtra() / layout.getDisplayDensity();
|
||||
}
|
||||
[lineHeightProperty.setNative](value: number) {
|
||||
const fontHeight = this.nativeTextViewProtected.getPaint().getFontMetricsInt(null);
|
||||
this.nativeTextViewProtected.setLineSpacing(Math.max(value - fontHeight, 0) * layout.getDisplayDensity(), 1);
|
||||
this.nativeView.setLineSpacing(value * layout.getDisplayDensity(), 1);
|
||||
}
|
||||
|
||||
[fontInternalProperty.getDefault](): android.graphics.Typeface {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"name": "NativeScript",
|
||||
"description": "NativeScript Core Modules",
|
||||
"homepage": "https://www.nativescript.org",
|
||||
"version": "6.5.12",
|
||||
"version": "6.5.13",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/NativeScript/NativeScript"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"main": "index",
|
||||
"types": "index.d.ts",
|
||||
"description": "NativeScript Core Modules",
|
||||
"version": "6.5.12",
|
||||
"version": "6.5.13",
|
||||
"homepage": "https://www.nativescript.org",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "tns-platform-declarations",
|
||||
"version": "6.5.12",
|
||||
"version": "6.5.13",
|
||||
"description": "Platform-specific TypeScript declarations for NativeScript for accessing native objects",
|
||||
"main": "",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user