mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2024-11-28 01:31:56 +00:00
Description: text适配用户自定义鼠标样式
IssueNo: https://gitee.com/openharmony/arkui_ace_engine/issues/I8IJZY Feature or Bugfix: Feature Binary Source:No Signed-off-by: chenjiafeng <chenjiafeng10@huawei.com>
This commit is contained in:
parent
e34ebf1b35
commit
9d740cfa9c
@ -114,7 +114,7 @@ frameworks/core/components_ng/pattern/root/ @zhoutianer
|
||||
frameworks/core/components_ng/pattern/scroll/ @rongShao-Z
|
||||
frameworks/core/components_ng/pattern/scroll_bar/ @rongShao-Z
|
||||
frameworks/core/components_ng/pattern/scrollable/ @yeyinglong_admin
|
||||
frameworks/core/components_ng/pattern/search/ @luoying_ace_admin
|
||||
frameworks/core/components_ng/pattern/search/ @jyj_0306
|
||||
frameworks/core/components_ng/pattern/security_component/ @
|
||||
frameworks/core/components_ng/pattern/select/ @luoying_ace_admin
|
||||
frameworks/core/components_ng/pattern/select_overlay/ @lijuan124
|
||||
|
@ -176,7 +176,6 @@ void SearchPattern::OnModifyDone()
|
||||
|
||||
InitButtonAndImageClickEvent();
|
||||
InitCancelButtonClickEvent();
|
||||
InitTextFieldMouseEvent();
|
||||
InitTextFieldValueChangeEvent();
|
||||
InitButtonMouseEvent(searchButtonMouseEvent_, BUTTON_INDEX);
|
||||
InitButtonMouseEvent(cancelButtonMouseEvent_, CANCEL_BUTTON_INDEX);
|
||||
@ -603,27 +602,6 @@ void SearchPattern::InitButtonTouchEvent(RefPtr<TouchEventImpl>& touchEvent, int
|
||||
gesture->AddTouchEvent(touchEvent);
|
||||
}
|
||||
|
||||
void SearchPattern::InitTextFieldMouseEvent()
|
||||
{
|
||||
auto host = GetHost();
|
||||
CHECK_NULL_VOID(host);
|
||||
auto textFieldFrameNode = DynamicCast<FrameNode>(host->GetChildAtIndex(TEXTFIELD_INDEX));
|
||||
CHECK_NULL_VOID(textFieldFrameNode);
|
||||
auto eventHub = textFieldFrameNode->GetEventHub<TextFieldEventHub>();
|
||||
CHECK_NULL_VOID(eventHub);
|
||||
auto inputHub = eventHub->GetOrCreateInputEventHub();
|
||||
CHECK_NULL_VOID(inputHub);
|
||||
|
||||
auto hoverTask = [weak = WeakClaim(this)](bool isHover) {
|
||||
auto pattern = weak.Upgrade();
|
||||
if (pattern) {
|
||||
pattern->SetMouseStyle(isHover ? MouseFormat::TEXT_CURSOR : MouseFormat::DEFAULT);
|
||||
}
|
||||
};
|
||||
textFieldHoverEvent_ = MakeRefPtr<InputEvent>(std::move(hoverTask));
|
||||
inputHub->AddOnHoverEvent(textFieldHoverEvent_);
|
||||
}
|
||||
|
||||
void SearchPattern::InitButtonMouseEvent(RefPtr<InputEvent>& inputEvent, int32_t childId)
|
||||
{
|
||||
if (inputEvent) {
|
||||
|
@ -155,7 +155,6 @@ private:
|
||||
void GetInnerFocusPaintRect(RoundRect& paintRect);
|
||||
void RequestKeyboard();
|
||||
// Init touch and hover event
|
||||
void InitTextFieldMouseEvent();
|
||||
void InitTextFieldValueChangeEvent();
|
||||
void InitButtonTouchEvent(RefPtr<TouchEventImpl>& touchEvent, int32_t childId);
|
||||
void InitButtonMouseEvent(RefPtr<InputEvent>& inputEvent, int32_t childId);
|
||||
|
Loading…
Reference in New Issue
Block a user