!40446 treeView适老化fontSizeScale可选

Merge pull request !40446 from 唐政辉/master
This commit is contained in:
openharmony_ci 2024-08-15 08:12:20 +00:00 committed by Gitee
commit d610796c64
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 4 additions and 4 deletions

View File

@ -970,7 +970,7 @@ export class TreeView extends ViewPU {
decideFontScale() {
let i25 = this.getUIContext();
let j25 = i25.getHostContext()?.config.fontSizeScale ?? 1;
let j25 = i25.getHostContext()?.config?.fontSizeScale ?? 1;
if (!this.followingSystemFontScale) {
return 1;
}
@ -3784,7 +3784,7 @@ export class TreeViewInner extends ViewPU {
decideFontScale() {
let g6 = this.getUIContext();
let h6 = g6.getHostContext()?.config.fontSizeScale ?? 1;
let h6 = g6.getHostContext()?.config?.fontSizeScale ?? 1;
if (!this.followingSystemFontScale) {
return 1;
}

View File

@ -1005,7 +1005,7 @@ export struct TreeView {
decideFontScale() {
let uiContent: UIContext = this.getUIContext();
let systemFontScale = (uiContent.getHostContext() as common.UIAbilityContext)?.config.fontSizeScale ?? 1;
let systemFontScale = (uiContent.getHostContext() as common.UIAbilityContext)?.config?.fontSizeScale ?? 1;
if (!this.followingSystemFontScale) {
return 1;
}
@ -3839,7 +3839,7 @@ export struct TreeViewInner {
decideFontScale() {
let uiContent: UIContext = this.getUIContext();
let systemFontScale = (uiContent.getHostContext() as common.UIAbilityContext)?.config.fontSizeScale ?? 1;
let systemFontScale = (uiContent.getHostContext() as common.UIAbilityContext)?.config?.fontSizeScale ?? 1;
if (!this.followingSystemFontScale) {
return 1;
}