From 37f7335f8ffce7a8dbbcaa0eb89199862ae7525a Mon Sep 17 00:00:00 2001 From: luozheng <1732036298@qq.com> Date: Sat, 22 Nov 2025 15:56:42 +0800 Subject: [PATCH] =?utf8?q?fd272=EF=BC=8C=E4=B8=8B=E6=8B=89=E7=8A=B6?= =?utf8?q?=E6=80=81=E6=A0=8F=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../nativeui/main/src/PullUpDownView.cpp | 37 ++----------------- 1 file changed, 3 insertions(+), 34 deletions(-) diff --git a/code/sdk/application/wearable/fd272/nativeapp/nativeui/main/src/PullUpDownView.cpp b/code/sdk/application/wearable/fd272/nativeapp/nativeui/main/src/PullUpDownView.cpp index 13a5743b6..c39394fc2 100644 --- a/code/sdk/application/wearable/fd272/nativeapp/nativeui/main/src/PullUpDownView.cpp +++ b/code/sdk/application/wearable/fd272/nativeapp/nativeui/main/src/PullUpDownView.cpp @@ -126,34 +126,6 @@ namespace OHOS WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "PullUpDownView::GetBlueToothConnectedStatus"); return SettingModel::GetInstance().GetBlueToothConnectStatus(); } - - // 设置蓝牙连接状态是否显示 - void PullUpDownView::SetPhoneConnectedIsVisible(bool state) - { - if (connectedStatusBackgroundButton && showPhoneConnectedStatus && showBluetoothConnectedStatus) - { - if (!state) - { - connectedStatusBackgroundButton->SetPosition(153, 10, 160, 50); - int x = connectedStatusBackgroundButton->GetX(); - int y = connectedStatusBackgroundButton->GetY(); - showPhoneConnectedStatus->SetVisible(true); - showBluetoothConnectedStatus->SetPosition(x + 68, y + 13); - } - else - { - connectedStatusBackgroundButton->SetPosition(178, 10, 110, 50); - int x = connectedStatusBackgroundButton->GetX(); - int y = connectedStatusBackgroundButton->GetY(); - showPhoneConnectedStatus->SetVisible(false); - showBluetoothConnectedStatus->SetPosition(x + 22, y + 13); - } - connectedStatusBackgroundButton->Invalidate(); - showPhoneConnectedStatus->Invalidate(); - showBluetoothConnectedStatus->Invalidate(); - } - } - // 更新手机连接状态 void PullUpDownView::UpdatePhoneStatus(int status) { @@ -163,11 +135,8 @@ namespace OHOS WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "showPhoneConnectedStatus nullptr"); return; } - // showPhoneConnectedStatus->SetSrc(status ? DROPDOWN_PHONECONNECTED_IMAGE : DROPDOWN_PHONEDISCONNECTED_IMAGE); - // showPhoneConnectedStatus->Invalidate(); showPhoneConnectedStatus->SetSrc(DROPDOWN_PHONEDISCONNECTED_IMAGE); - SetPhoneConnectedIsVisible(status); if (GetConnectedStatusView() != nullptr) GetConnectedStatusView()->UpdatePhoneConnectedStatus(status); @@ -218,7 +187,7 @@ namespace OHOS return; } } - connectedStatusBackgroundButton->SetPosition(153, 10, 160, 50); + connectedStatusBackgroundButton->SetPosition(178, 10, 110, 50); connectedStatusBackgroundButton->SetViewId(CONNECTEDSTATUSBACKGROUNDBUTTON); connectedStatusBackgroundButton->SetStyle(STYLE_BACKGROUND_COLOR, 0xff191919); connectedStatusBackgroundButton->SetStyle(STYLE_BACKGROUND_OPA, 0xff); @@ -235,7 +204,7 @@ namespace OHOS /* -------------------------------- 显示手机连接状态 -------------------------------- */ if (showPhoneConnectedStatus == nullptr) { - showPhoneConnectedStatus = DropDownConnectedStatusImageViweInit(x + 26, y + 13, 24, 24); + showPhoneConnectedStatus = DropDownConnectedStatusImageViweInit(x + 22, y + 13, 24, 24); if (showPhoneConnectedStatus == nullptr) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "showPhoneConnectedStatus new fail"); @@ -245,7 +214,7 @@ namespace OHOS /* -------------------------------- 显示蓝牙连接状态 -------------------------------- */ if (showBluetoothConnectedStatus == nullptr) { - showBluetoothConnectedStatus = DropDownConnectedStatusImageViweInit(x + 110, y + 13, 24, 24); + showBluetoothConnectedStatus = DropDownConnectedStatusImageViweInit(x + 64, y + 13, 24, 24); if (showBluetoothConnectedStatus == nullptr) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "showBluetoothConnectedStatus new fail"); -- 2.17.1