forked from mirror/OpenTTD
(svn r25532) -Fix: Do not make the minimal size of matrix or panel widgets depend on their number of rows, since that changes when resizing the window.
This commit is contained in:
@@ -111,7 +111,7 @@ struct AIListWindow : public Window {
|
|||||||
|
|
||||||
resize->width = 1;
|
resize->width = 1;
|
||||||
resize->height = this->line_height;
|
resize->height = this->line_height;
|
||||||
size->height = GB(this->GetWidget<NWidgetCore>(widget)->widget_data, MAT_ROW_START, MAT_ROW_BITS) * this->line_height;
|
size->height = 5 * this->line_height;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -351,7 +351,7 @@ struct AISettingsWindow : public Window {
|
|||||||
|
|
||||||
resize->width = 1;
|
resize->width = 1;
|
||||||
resize->height = this->line_height;
|
resize->height = this->line_height;
|
||||||
size->height = GB(this->GetWidget<NWidgetCore>(widget)->widget_data, MAT_ROW_START, MAT_ROW_BITS) * this->line_height;
|
size->height = 5 * this->line_height;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -761,9 +761,13 @@ struct AIConfigWindow : public Window {
|
|||||||
{
|
{
|
||||||
switch (widget) {
|
switch (widget) {
|
||||||
case WID_AIC_GAMELIST:
|
case WID_AIC_GAMELIST:
|
||||||
|
this->line_height = FONT_HEIGHT_NORMAL + WD_MATRIX_TOP + WD_MATRIX_BOTTOM;
|
||||||
|
size->height = 1 * this->line_height;
|
||||||
|
break;
|
||||||
|
|
||||||
case WID_AIC_LIST:
|
case WID_AIC_LIST:
|
||||||
this->line_height = FONT_HEIGHT_NORMAL + WD_MATRIX_TOP + WD_MATRIX_BOTTOM;
|
this->line_height = FONT_HEIGHT_NORMAL + WD_MATRIX_TOP + WD_MATRIX_BOTTOM;
|
||||||
size->height = GB(this->GetWidget<NWidgetCore>(widget)->widget_data, MAT_ROW_START, MAT_ROW_BITS) * this->line_height;
|
size->height = 8 * this->line_height;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -284,7 +284,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
this->line_height = FONT_HEIGHT_NORMAL + WD_MATRIX_TOP + WD_MATRIX_BOTTOM;
|
this->line_height = FONT_HEIGHT_NORMAL + WD_MATRIX_TOP + WD_MATRIX_BOTTOM;
|
||||||
size->height = this->vscroll->GetCapacity() * this->line_height;
|
size->height = 5 * this->line_height;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -215,7 +215,7 @@ struct NewGRFParametersWindow : public Window {
|
|||||||
|
|
||||||
resize->width = 1;
|
resize->width = 1;
|
||||||
resize->height = this->line_height;
|
resize->height = this->line_height;
|
||||||
size->height = GB(this->GetWidget<NWidgetCore>(widget)->widget_data, MAT_ROW_START, MAT_ROW_BITS) * this->line_height;
|
size->height = 5 * this->line_height;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WID_NP_DESCRIPTION:
|
case WID_NP_DESCRIPTION:
|
||||||
|
@@ -153,7 +153,7 @@ public:
|
|||||||
size->width += padding.width;
|
size->width += padding.width;
|
||||||
this->line_height = FONT_HEIGHT_NORMAL + WD_MATRIX_TOP + WD_MATRIX_BOTTOM;
|
this->line_height = FONT_HEIGHT_NORMAL + WD_MATRIX_TOP + WD_MATRIX_BOTTOM;
|
||||||
resize->height = this->line_height;
|
resize->height = this->line_height;
|
||||||
size->height = this->vscroll->GetCapacity() * this->line_height;
|
size->height = 5 * this->line_height;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1037,7 +1037,7 @@ public:
|
|||||||
}
|
}
|
||||||
size->width = max(size->width, d.width + padding.width);
|
size->width = max(size->width, d.width + padding.width);
|
||||||
this->line_height = FONT_HEIGHT_NORMAL + WD_MATRIX_TOP + WD_MATRIX_BOTTOM;
|
this->line_height = FONT_HEIGHT_NORMAL + WD_MATRIX_TOP + WD_MATRIX_BOTTOM;
|
||||||
size->height = GB(this->GetWidget<NWidgetCore>(widget)->widget_data, MAT_ROW_START, MAT_ROW_BITS) * this->line_height;
|
size->height = 5 * this->line_height;
|
||||||
resize->height = this->line_height;
|
resize->height = this->line_height;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user