!2118 RK3568备忘录应用按钮鼠标悬浮显示黑色;Switch用例失败

Merge pull request !2118 from luoying_ace/ly0303
This commit is contained in:
openharmony_ci
2022-04-02 04:31:15 +00:00
committed by Gitee
2 changed files with 11 additions and 10 deletions
+10 -10
View File
@@ -164,16 +164,6 @@ void DOMSwitch::PrepareSpecializedComponent()
backDecoration->SetBorderRadius(Radius(BOX_HOVER_RADIUS));
boxComponent_->SetBackDecoration(backDecoration);
}
RefPtr<SwitchTheme> theme = GetTheme<SwitchTheme>();
if (switchChild_->GetShowText()) {
return;
}
if (boxComponent_->GetHeightDimension().Value() < 0.0 && theme) {
boxComponent_->SetHeight(theme->GetHeight().Value(), theme->GetHeight().Unit());
}
if (boxComponent_->GetWidthDimension().Value() < 0.0 && theme) {
boxComponent_->SetWidth(theme->GetWidth().Value(), theme->GetWidth().Unit());
}
}
if (HasCheckedPseudo()) {
PrepareCheckedListener();
@@ -186,6 +176,16 @@ void DOMSwitch::PrepareSpecializedComponent()
if (!textOff_.empty()) {
switchChild_->SetTextOff(textOff_);
}
RefPtr<SwitchTheme> theme = GetTheme<SwitchTheme>();
if (switchChild_->GetShowText()) {
return;
}
if (boxComponent_->GetHeightDimension().Value() < 0.0 && theme) {
boxComponent_->SetHeight(theme->GetHeight().Value(), theme->GetHeight().Unit());
}
if (boxComponent_->GetWidthDimension().Value() < 0.0 && theme) {
boxComponent_->SetWidth(theme->GetWidth().Value(), theme->GetWidth().Unit());
}
#ifndef WEARABLE_PRODUCT
if (declaration_) {
auto& multimodalAttr =
@@ -253,6 +253,7 @@ void JSButton::SetDefaultAttributes(const RefPtr<ButtonComponent>& buttonCompone
buttonComponent->SetHeight(buttonTheme->GetHeight());
buttonComponent->SetBackgroundColor(buttonTheme->GetBgColor());
buttonComponent->SetClickedColor(buttonComponent->GetBackgroundColor().BlendColor(buttonTheme->GetClickedColor()));
buttonComponent->SetHoverColor(buttonTheme->GetHoverColor());
}
void JSButton::SetTypeAndStateEffect(const JSRef<JSObject>& obj, const RefPtr<ButtonComponent>& buttonComponent)