mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2024-11-30 10:43:03 +00:00
fix stepper theme
Signed-off-by: sunfei <sunfei.sun@huawei.com> Change-Id: I52bb61f15640fe814f27349aa4c31e34c7bccae3
This commit is contained in:
parent
7b61751464
commit
bab2d993b9
@ -54,6 +54,11 @@ void JSStepper::Create(const JSCallbackInfo& info)
|
||||
stepperComponent->SetButtonPressedHeight(theme->GetButtonPressedHeight());
|
||||
stepperComponent->SetControlHeight(theme->GetControlHeight());
|
||||
stepperComponent->SetControlMargin(theme->GetControlMargin());
|
||||
stepperComponent->SetControlPadding(theme->GetControlPadding());
|
||||
stepperComponent->SetFocusColor(theme->GetFocusColor());
|
||||
stepperComponent->SetFocusBorderWidth(theme->GetFocusBorderWidth());
|
||||
stepperComponent->SetMouseHoverColor(theme->GetMouseHoverColor());
|
||||
stepperComponent->SetDisabledAlpha(theme->GetDisabledAlpha());
|
||||
}
|
||||
ViewStackProcessor::GetInstance()->Push(stepperComponent);
|
||||
}
|
||||
|
@ -35,7 +35,11 @@ void JSStepperItem::Create(const JSCallbackInfo& info)
|
||||
RefPtr<StepperItemComponent> stepperItemComponent = stepperItemComponentV2->GetStepperItemComponent();
|
||||
RefPtr<StepperTheme> stepperTheme = GetTheme<StepperTheme>();
|
||||
if (stepperTheme) {
|
||||
stepperItemComponent->SetTextStyle(stepperTheme->GetTextStyle());
|
||||
TextStyle textStyle_ = stepperTheme->GetTextStyle();
|
||||
textStyle_.SetAdaptTextSize(stepperTheme->GetTextStyle().GetFontSize(), stepperTheme->GetMinFontSize());
|
||||
textStyle_.SetMaxLines(stepperTheme->GetTextMaxLines());
|
||||
textStyle_.SetTextOverflow(TextOverflow::ELLIPSIS);
|
||||
stepperItemComponent->SetTextStyle(textStyle_);
|
||||
}
|
||||
auto focusAnimationTheme = GetTheme<FocusAnimationTheme>();
|
||||
if (focusAnimationTheme) {
|
||||
|
Loading…
Reference in New Issue
Block a user