summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ai/ai_gui.cpp10
-rw-r--r--src/airport_gui.cpp2
-rw-r--r--src/newgrf_gui.cpp2
-rw-r--r--src/object_gui.cpp2
-rw-r--r--src/rail_gui.cpp2
5 files changed, 11 insertions, 7 deletions
diff --git a/src/ai/ai_gui.cpp b/src/ai/ai_gui.cpp
index 8820162f8..ff3a8a502 100644
--- a/src/ai/ai_gui.cpp
+++ b/src/ai/ai_gui.cpp
@@ -111,7 +111,7 @@ struct AIListWindow : public Window {
resize->width = 1;
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->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) {
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:
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;
}
}
diff --git a/src/airport_gui.cpp b/src/airport_gui.cpp
index 3a74b4c9a..0543e4282 100644
--- a/src/airport_gui.cpp
+++ b/src/airport_gui.cpp
@@ -284,7 +284,7 @@ public:
}
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;
}
diff --git a/src/newgrf_gui.cpp b/src/newgrf_gui.cpp
index a1da67b23..37ed023b0 100644
--- a/src/newgrf_gui.cpp
+++ b/src/newgrf_gui.cpp
@@ -215,7 +215,7 @@ struct NewGRFParametersWindow : public Window {
resize->width = 1;
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;
case WID_NP_DESCRIPTION:
diff --git a/src/object_gui.cpp b/src/object_gui.cpp
index d32075aab..b27388313 100644
--- a/src/object_gui.cpp
+++ b/src/object_gui.cpp
@@ -153,7 +153,7 @@ public:
size->width += padding.width;
this->line_height = FONT_HEIGHT_NORMAL + WD_MATRIX_TOP + WD_MATRIX_BOTTOM;
resize->height = this->line_height;
- size->height = this->vscroll->GetCapacity() * this->line_height;
+ size->height = 5 * this->line_height;
break;
}
diff --git a/src/rail_gui.cpp b/src/rail_gui.cpp
index 03219e062..a3642e5c3 100644
--- a/src/rail_gui.cpp
+++ b/src/rail_gui.cpp
@@ -1037,7 +1037,7 @@ public:
}
size->width = max(size->width, d.width + padding.width);
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;
break;
}