@@ -905,26 +905,26 @@ public:
* @param type the widget type to check
* @return true if it is a button for us
*/
bool IsButton(WidgetType type) const
{
return type == WWT_IMGBTN || type == WWT_IMGBTN_2 || type == WWT_PUSHIMGBTN;
}
void SetupSmallestSize(Window *w, bool init_array)
this->smallest_x = 0; // Biggest child
this->smallest_y = 0; // Biggest child
this->fill_x = true;
this->fill_y = false;
this->fill_x = 1;
this->fill_y = 0;
this->resize_x = 1; // We only resize in this direction
this->resize_y = 0; // We never resize in this direction
this->spacers = 0;
/* First initialise some variables... */
for (NWidgetBase *child_wid = this->head; child_wid != NULL; child_wid = child_wid->next) {
child_wid->SetupSmallestSize(w, init_array);
this->smallest_y = max(this->smallest_y, child_wid->smallest_y + child_wid->padding_top + child_wid->padding_bottom);
if (this->IsButton(child_wid->type)) {
this->smallest_x = max(this->smallest_x, child_wid->smallest_x + child_wid->padding_left + child_wid->padding_right);
} else if (child_wid->type == NWID_SPACER) {
this->spacers++;