iOS: fix when set padding
This commit is contained in:
parent
a46bfe9284
commit
98db105a73
@ -429,10 +429,10 @@ - (void)layoutStack {
|
||||
continue;
|
||||
}
|
||||
if (self.widthSpec == DoricLayoutFit && layout.widthSpec == DoricLayoutMost) {
|
||||
layout.measuredWidth = self.measuredWidth - layout.marginLeft - layout.marginRight;
|
||||
layout.measuredWidth = self.contentWidth - layout.marginLeft - layout.marginRight;
|
||||
}
|
||||
if (self.heightSpec == DoricLayoutFit && layout.heightSpec == DoricLayoutMost) {
|
||||
layout.measuredHeight = self.measuredHeight - layout.marginTop - layout.marginBottom;
|
||||
layout.measuredHeight = self.contentHeight - layout.marginTop - layout.marginBottom;
|
||||
}
|
||||
[layout layout];
|
||||
DoricGravity gravity = layout.alignment;
|
||||
@ -488,7 +488,7 @@ - (void)layoutVLayout {
|
||||
continue;
|
||||
}
|
||||
if (self.widthSpec == DoricLayoutFit && layout.widthSpec == DoricLayoutMost) {
|
||||
layout.measuredWidth = self.measuredWidth - layout.marginLeft - layout.marginRight;
|
||||
layout.measuredWidth = self.contentWidth - layout.marginLeft - layout.marginRight;
|
||||
}
|
||||
[layout layout];
|
||||
DoricGravity gravity = layout.alignment | self.gravity;
|
||||
@ -531,7 +531,7 @@ - (void)layoutHLayout {
|
||||
}
|
||||
|
||||
if (self.heightSpec == DoricLayoutFit && layout.heightSpec == DoricLayoutMost) {
|
||||
layout.measuredHeight = self.measuredHeight - layout.marginTop - layout.marginBottom;
|
||||
layout.measuredHeight = self.contentHeight - layout.marginTop - layout.marginBottom;
|
||||
}
|
||||
|
||||
[layout layout];
|
||||
|
Reference in New Issue
Block a user