From: xue <2144439972@qq.com> Date: Sat, 7 Mar 2026 08:43:17 +0000 (+0800) Subject: 增加对话文本滚动速度控制 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=refs%2Fchanges%2F3253%2F2;p=mirrors%2FFD230.git 增加对话文本滚动速度控制 --- diff --git a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/include/ThunderBirdDialogueView.h b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/include/ThunderBirdDialogueView.h index 3db6796b5..55847ef73 100644 --- a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/include/ThunderBirdDialogueView.h +++ b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/include/ThunderBirdDialogueView.h @@ -147,6 +147,8 @@ namespace OHOS THUNDERBIRD_DIALOGUEVIEW_LISTENING, // 聆听中 THUNDERBIRD_DIALOGUEVIEW_STATUS_SHOW, // 状态展示 }; + //切换跑马灯速度 + void SwitchRollSpeed(int16_t speed); private: UIViewGroup *group{nullptr}; diff --git a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdDialogueView.cpp b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdDialogueView.cpp index df5e95eae..cf2b31d94 100644 --- a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdDialogueView.cpp +++ b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdDialogueView.cpp @@ -332,6 +332,11 @@ namespace OHOS if (listenAnimator) { listenAnimator->SetVisible(true); listenAnimator->Stop(); } } + void ThunderBirdDialogueView::SwitchRollSpeed(int16_t speed) + { + if(!TextLabel) return; + TextLabel->SetRollSpeed(speed); + } } diff --git a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdModel.cpp b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdModel.cpp index 845ccac14..52d84575c 100644 --- a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdModel.cpp +++ b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdModel.cpp @@ -4001,6 +4001,8 @@ extern "C" { // 进入对话模式时记录当前表情 void ThunderBirdModel::OnEnterDialogueMode() { + //切换跑马灯速度 + ThunderBirdDialogueView::GetInstance()->SwitchRollSpeed(105); // 记录进入对话模式前的时间线表情(用于退出时恢复) m_dialogueExpression = "winking"; WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ThunderBirdModel::OnEnterDialogueMode: 记录时间线表情: %s", m_currentExpression.c_str()); @@ -4095,6 +4097,8 @@ extern "C" { // 退出对话模式时恢复表情 void ThunderBirdModel::OnExitDialogueMode() { + //切换跑马灯速度 + ThunderBirdDialogueView::GetInstance()->SwitchRollSpeed(75); WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ThunderBirdModel::OnExitDialogueMode: 开始退出对话模式"); ln_ws_set_vad_recognition_enabled(false);