mirror of https://github.com/OpenTTD/OpenTTD
Fix: Restore original cargo legend 'blob' dimensions. (#11480)
An off-by-one in a previous life made the 'blob' too narrow.pull/11484/head
parent
c2f19fed24
commit
09d01bd015
|
@ -901,7 +901,7 @@ struct PaymentRatesGraphWindow : BaseGraphWindow {
|
||||||
void OnInit() override
|
void OnInit() override
|
||||||
{
|
{
|
||||||
/* Width of the legend blob. */
|
/* Width of the legend blob. */
|
||||||
this->legend_width = (GetCharacterHeight(FS_SMALL) - ScaleGUITrad(1)) * 8 / 5;
|
this->legend_width = GetCharacterHeight(FS_SMALL) * 9 / 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateExcludedData()
|
void UpdateExcludedData()
|
||||||
|
|
|
@ -419,7 +419,7 @@ public:
|
||||||
{
|
{
|
||||||
/* Width of the legend blob -- slightly larger than the smallmap legend blob. */
|
/* Width of the legend blob -- slightly larger than the smallmap legend blob. */
|
||||||
this->legend.height = GetCharacterHeight(FS_SMALL);
|
this->legend.height = GetCharacterHeight(FS_SMALL);
|
||||||
this->legend.width = this->legend.height * 8 / 5;
|
this->legend.width = this->legend.height * 9 / 6;
|
||||||
|
|
||||||
this->SetupArrays();
|
this->SetupArrays();
|
||||||
}
|
}
|
||||||
|
@ -2552,7 +2552,7 @@ struct IndustryCargoesWindow : public Window {
|
||||||
|
|
||||||
/* Size of the legend blob -- slightly larger than the smallmap legend blob. */
|
/* Size of the legend blob -- slightly larger than the smallmap legend blob. */
|
||||||
CargoesField::legend.height = GetCharacterHeight(FS_SMALL);
|
CargoesField::legend.height = GetCharacterHeight(FS_SMALL);
|
||||||
CargoesField::legend.width = CargoesField::legend.height * 8 / 5;
|
CargoesField::legend.width = CargoesField::legend.height * 9 / 6;
|
||||||
|
|
||||||
/* Size of cargo lines. */
|
/* Size of cargo lines. */
|
||||||
CargoesField::cargo_line.width = ScaleGUITrad(6);
|
CargoesField::cargo_line.width = ScaleGUITrad(6);
|
||||||
|
|
|
@ -1515,7 +1515,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Width of the legend blob. */
|
/* Width of the legend blob. */
|
||||||
this->legend_width = (GetCharacterHeight(FS_SMALL) - ScaleGUITrad(1)) * 8 / 5;
|
this->legend_width = GetCharacterHeight(FS_SMALL) * 9 / 6;
|
||||||
|
|
||||||
/* The width of a column is the minimum width of all texts + the size of the blob + some spacing */
|
/* The width of a column is the minimum width of all texts + the size of the blob + some spacing */
|
||||||
this->column_width = min_width + WidgetDimensions::scaled.hsep_normal + this->legend_width + WidgetDimensions::scaled.framerect.Horizontal();
|
this->column_width = min_width + WidgetDimensions::scaled.hsep_normal + this->legend_width + WidgetDimensions::scaled.framerect.Horizontal();
|
||||||
|
|
Loading…
Reference in New Issue