Change: Use RectPadding Horizontal()/Vertical() helpers.
This commit is contained in:
@@ -1354,10 +1354,10 @@ public:
|
||||
/* First initialise some variables... */
|
||||
for (NWidgetBase *child_wid = this->head; child_wid != nullptr; child_wid = child_wid->next) {
|
||||
child_wid->SetupSmallestSize(w, init_array);
|
||||
this->smallest_y = std::max(this->smallest_y, child_wid->smallest_y + child_wid->padding.top + child_wid->padding.bottom);
|
||||
this->smallest_y = std::max(this->smallest_y, child_wid->smallest_y + child_wid->padding.Vertical());
|
||||
if (this->IsButton(child_wid->type)) {
|
||||
nbuttons++;
|
||||
this->smallest_x = std::max(this->smallest_x, child_wid->smallest_x + child_wid->padding.left + child_wid->padding.right);
|
||||
this->smallest_x = std::max(this->smallest_x, child_wid->smallest_x + child_wid->padding.Horizontal());
|
||||
} else if (child_wid->type == NWID_SPACER) {
|
||||
this->spacers++;
|
||||
}
|
||||
|
Reference in New Issue
Block a user