From: xue <2144439972@qq.com> Date: Thu, 6 Nov 2025 06:53:43 +0000 (+0800) Subject: 解决二维码大小跳变问题 X-Git-Tag: V1.0.9_20251128_194606_LN~101^2~11 X-Git-Url: http://git.snicker.com.cn/css/static/script.js?a=commitdiff_plain;h=fb7979b8bf6b561faa752ee288421a85e13a8e93;p=mirrors%2FFD230.git 解决二维码大小跳变问题 --- 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 d511fb252..776c53a0a 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 @@ -182,7 +182,7 @@ namespace OHOS } if (TextLabel) { - TextLabel->SetPosition(TextLabel_Y->GetX()-1.5, TextLabel_Y->GetY()-1.5, 325, 42); + TextLabel->SetPosition(TextLabel_Y->GetX()-2, TextLabel_Y->GetY()-2, 325, 42); TextLabel->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER); TextLabel->SetVisible(true); } @@ -245,7 +245,7 @@ namespace OHOS } if (TextLabel) { - TextLabel->SetPosition(TextLabel_Y->GetX()-1.2, TextLabel_Y->GetY()-1.2, 325, 42); + TextLabel->SetPosition(TextLabel_Y->GetX()-2, TextLabel_Y->GetY()-2, 325, 42); TextLabel->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER); TextLabel->SetText(currentStatusText.c_str()); TextLabel->SetVisible(true); diff --git a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdGuideView.cpp b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdGuideView.cpp index f7bc820be..de7cd7ad6 100644 --- a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdGuideView.cpp +++ b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdGuideView.cpp @@ -82,6 +82,7 @@ namespace OHOS { qrcode_->SetPosition(119, 157, 111, 111); qrcode_->SetQrcodeInfo(ThunderBirdModel::GetInstance()->GetQrcodeContent().c_str()); + qrcode_->SetPosition(119, 157, 111, 111); qrcode_->SetStyle(STYLE_PADDING_LEFT, 4); qrcode_->SetStyle(STYLE_PADDING_RIGHT, 4); qrcode_->SetStyle(STYLE_PADDING_TOP, 4); @@ -308,6 +309,7 @@ namespace OHOS { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ThunderBirdGuideView::qrcode_ path:%s", ThunderBirdModel::GetInstance()->GetQrcodeContent().c_str()); qrcode_->SetQrcodeInfo(ThunderBirdModel::GetInstance()->GetQrcodeContent().c_str()); + qrcode_->SetPosition(119, 157, 111, 111); qrcode_->SetVisible(true); } if(RemindIcon) @@ -339,10 +341,10 @@ namespace OHOS WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "start qrcode path:%s", ThunderBirdModel::GetInstance()->GetQrcodeContent().c_str()); // 重新设置二维码的尺寸和样式,防止变小 - qrcode_->SetPosition(119, 157, 111, 111); + qrcode_->SetQrcodeInfo(ThunderBirdModel::GetInstance()->GetQrcodeContent().c_str()); - + qrcode_->SetPosition(119, 157, 111, 111); // 强制重新设置尺寸,防止SetQrcodeInfo后尺寸被改变 qrcode_->Invalidate();//刷新 }