mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-06 14:27:16 +00:00
Width was based on actual number of data points instead of possible number of data points.
This commit is contained in:
parent
cb13ee90ef
commit
d9461e52af
@ -548,7 +548,7 @@ public:
|
||||
SetDParam(1, INT64_MAX);
|
||||
uint y_label_width = GetStringBoundingBox(STR_GRAPH_Y_LABEL).width;
|
||||
|
||||
size->width = std::max<uint>(size->width, ScaleGUITrad(5) + y_label_width + this->num_on_x_axis * (x_label_width + ScaleGUITrad(5)) + ScaleGUITrad(9));
|
||||
size->width = std::max<uint>(size->width, ScaleGUITrad(5) + y_label_width + this->num_vert_lines * (x_label_width + ScaleGUITrad(5)) + ScaleGUITrad(9));
|
||||
size->height = std::max<uint>(size->height, ScaleGUITrad(5) + (1 + MIN_GRAPH_NUM_LINES_Y * 2 + (this->draw_dates ? 3 : 1)) * GetCharacterHeight(FS_SMALL) + ScaleGUITrad(4));
|
||||
size->height = std::max<uint>(size->height, size->width / 3);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user