mirror of
https://github.com/openharmony/ace_engine_lite.git
synced 2026-07-21 17:05:21 -04:00
issueNo: I4C7HL
Description: make the vertical align to top version lower than 5 Feature or Bugfix:Bugfix Binary Source:No Signed-off-by: youzhi92 <chenyouzhi@huawei.com> Change-Id: If41e8d6765b721440e8237e73c6ff80f5dbc89fa
This commit is contained in:
@@ -245,7 +245,12 @@ void TextComponent::SetTextAlign(UILabelTypeWrapper &label, const AppStyleItem *
|
||||
stylePropValue);
|
||||
break;
|
||||
}
|
||||
label.SetAlign(align, UITextLanguageAlignment::TEXT_ALIGNMENT_CENTER);
|
||||
const int32_t defaultVerticalAlignCenterApiVersion = 5;
|
||||
if (JsAppContext::GetInstance()->GetTargetApi() < defaultVerticalAlignCenterApiVersion) {
|
||||
label.SetAlign(align, UITextLanguageAlignment::TEXT_ALIGNMENT_TOP);
|
||||
} else {
|
||||
label.SetAlign(align, UITextLanguageAlignment::TEXT_ALIGNMENT_CENTER);
|
||||
}
|
||||
}
|
||||
} // namespace ACELite
|
||||
} // namespace OHOS
|
||||
|
||||
Reference in New Issue
Block a user