mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2025-04-06 01:22:06 +00:00
【button】js_button padding新增判空
Signed-off-by: yyuanche <yuancheng25@huawei.com> Change-Id: I1228b9a7f06493e682c10b9a492717996f88271b
This commit is contained in:
parent
b14806b970
commit
a8cfded3d8
@ -460,6 +460,7 @@ NG::PaddingProperty JSButton::GetNewPadding(const JSCallbackInfo& info)
|
||||
NG::CalcLength(0.0) };
|
||||
if (isLabelButton_) {
|
||||
auto buttonTheme = GetTheme<ButtonTheme>();
|
||||
CHECK_NULL_RETURN(buttonTheme, padding);
|
||||
auto defaultPadding = buttonTheme->GetPadding();
|
||||
padding = { NG::CalcLength(defaultPadding.Left()), NG::CalcLength(defaultPadding.Right()),
|
||||
NG::CalcLength(defaultPadding.Top()), NG::CalcLength(defaultPadding.Bottom()) };
|
||||
|
Loading…
x
Reference in New Issue
Block a user