mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2024-11-23 15:10:30 +00:00
modify focus location
Signed-off-by: tengfan <tengfan3@huawei.com>
This commit is contained in:
parent
7ff3903b0a
commit
0b3b50f3cd
@ -2623,6 +2623,9 @@ void RosenRenderContext::PaintAccessibilityFocus()
|
||||
frameRect.SetRect(RectF(lineWidth, lineWidth, noGreenBorderHeight, noGreenBorderWidth));
|
||||
RectT<int32_t> localRect = GetAccessibilityFocusRect().value_or(RectT<int32_t>());
|
||||
if (localRect != RectT<int32_t>()) {
|
||||
RectT<int32_t> containerRect;
|
||||
containerRect.SetRect(0, 0, bounds.z_, bounds.w_);
|
||||
localRect = localRect.Constrain(containerRect);
|
||||
RectF globalRect = frameRect.GetRect();
|
||||
auto localRectWidth = localRect.Width() - 2 * lineWidth;
|
||||
auto localRectHeight = localRect.Height() - 2 * lineWidth;
|
||||
@ -2634,7 +2637,6 @@ void RosenRenderContext::PaintAccessibilityFocus()
|
||||
}
|
||||
globalRect.SetRect(globalRect.GetX() + localRect.GetX(), globalRect.GetY() + localRect.GetY(),
|
||||
localRectWidth, localRectHeight);
|
||||
globalRect = globalRect.Constrain(frameRect.GetRect());
|
||||
if (globalRect.IsEmpty()) {
|
||||
ClearAccessibilityFocus();
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user