mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2024-10-07 08:24:11 +00:00
fix 切换成维吾尔语后showCounter的位置不对
Signed-off-by: zhoukechen <zhoukechen2@huawei.com> Change-Id: I3cb1bc3e197470a41e9b74168eeff840daa4a0aa
This commit is contained in:
parent
5383d1ed49
commit
e201fc60e9
@ -419,27 +419,11 @@ TextAlign TextFieldLayoutAlgorithm::GetCounterNodeAlignment(LayoutWrapper* layou
|
||||
RefPtr<LayoutProperty> property = frameNode->GetLayoutProperty();
|
||||
CHECK_NULL_RETURN(property, TextAlign::END);
|
||||
TextDirection layoutDirection = property->GetLayoutDirection();
|
||||
TextAlign textAlign = TextAlign::END;
|
||||
switch (layoutDirection) {
|
||||
case TextDirection::LTR:
|
||||
case TextDirection::AUTO:
|
||||
if (isRTL) {
|
||||
textAlign = TextAlign::START;
|
||||
} else {
|
||||
textAlign = TextAlign::END;
|
||||
}
|
||||
break;
|
||||
case TextDirection::RTL:
|
||||
if (isRTL) {
|
||||
textAlign = TextAlign::END;
|
||||
} else {
|
||||
textAlign = TextAlign::START;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
if ((layoutDirection == TextDirection::RTL && !isRTL) ||
|
||||
(layoutDirection == TextDirection::LTR && isRTL)) {
|
||||
return TextAlign::START;
|
||||
}
|
||||
return textAlign;
|
||||
return TextAlign::END;
|
||||
}
|
||||
|
||||
void TextFieldLayoutAlgorithm::UpdateCounterNode(
|
||||
|
@ -1211,7 +1211,7 @@ void TextFieldPattern::HandleBlurEvent()
|
||||
auto host = GetHost();
|
||||
CHECK_NULL_VOID(host);
|
||||
TAG_LOGI(AceLogTag::ACE_TEXT_FIELD, "TextField %{public}d OnBlur", host->GetId());
|
||||
auto context = PipelineContext::GetCurrentContextSafely();
|
||||
auto context = host->GetContextRefPtr();
|
||||
CHECK_NULL_VOID(context);
|
||||
UpdateBlurReason();
|
||||
auto textFieldManager = DynamicCast<TextFieldManagerNG>(context->GetTextFieldManager());
|
||||
@ -3308,10 +3308,10 @@ void TextFieldPattern::RestoreDefaultMouseState()
|
||||
#ifdef WINDOW_SCENE_SUPPORTED
|
||||
windowId = static_cast<int32_t>(GetSCBSystemWindowId());
|
||||
#endif
|
||||
auto pipeline = PipelineContext::GetCurrentContextSafely();
|
||||
CHECK_NULL_VOID(pipeline);
|
||||
auto host = GetHost();
|
||||
CHECK_NULL_VOID(host);
|
||||
auto pipeline = host->GetContextRefPtr();
|
||||
CHECK_NULL_VOID(pipeline);
|
||||
auto id = host->GetId();
|
||||
pipeline->SetMouseStyleHoldNode(id);
|
||||
pipeline->ChangeMouseStyle(id, MouseFormat::DEFAULT, windowId);
|
||||
|
Loading…
Reference in New Issue
Block a user