mirror of
https://github.com/openharmony/ace_ace_engine.git
synced 2026-07-19 14:43:36 -04:00
!2118 RK3568备忘录应用按钮鼠标悬浮显示黑色;Switch用例失败
Merge pull request !2118 from luoying_ace/ly0303
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user