From 8de9536abe733e26c64d3925f436bbb14bb954d6 Mon Sep 17 00:00:00 2001 From: houzh Date: Mon, 13 Mar 2023 00:47:39 +0000 Subject: [PATCH] fix View's paddingXXX --- src/gui/view/view.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/view/view.cc b/src/gui/view/view.cc index e201e51d..fa0537cf 100755 --- a/src/gui/view/view.cc +++ b/src/gui/view/view.cc @@ -263,8 +263,8 @@ View::View(Context*ctx,const AttributeSet&attrs){ leftPaddingDefined = true; rightPaddingDefined = true; }else{ - int horz=attrs.getDimensionPixelSize("paddingHorizontal",0); - int vert=attrs.getDimensionPixelSize("paddingVertical",0); + int horz=attrs.getDimensionPixelSize("paddingHorizontal",-1); + int vert=attrs.getDimensionPixelSize("paddingVertical",-1); if(horz>=0){ leftPadding = rightPadding = horz; leftPaddingDefined = rightPaddingDefined = true;