File diff r19845:1a7e8f4e03df → r19846:75a27628493b
src/graph_gui.cpp
Show inline comments
 
@@ -501,13 +501,13 @@ public:
 
					month = 0;
 
					year++;
 
				}
 
			}
 
		} else {
 
			/* Draw the label under the data point rather than on the grid line. */
 
			SetDParam(0, this->x_values_start + this->num_on_x_axis * this->x_values_increment);
 
			SetDParamMaxValue(0, this->x_values_start + this->num_on_x_axis * this->x_values_increment);
 
			x_label_width = GetStringBoundingBox(STR_GRAPH_Y_LABEL_NUMBER).width;
 
		}
 

	
 
		SetDParam(0, this->format_str_y_axis);
 
		SetDParam(1, INT64_MAX);
 
		uint y_label_width = GetStringBoundingBox(STR_GRAPH_Y_LABEL).width;
 
@@ -1319,16 +1319,16 @@ struct PerformanceRatingDetailWindow : W
 
				size->height = this->bar_height + 2 * WD_MATRIX_TOP;
 

	
 
				uint score_info_width = 0;
 
				for (uint i = SCORE_BEGIN; i < SCORE_END; i++) {
 
					score_info_width = max(score_info_width, GetStringBoundingBox(STR_PERFORMANCE_DETAIL_VEHICLES + i).width);
 
				}
 
				SetDParam(0, 1000);
 
				SetDParamMaxValue(0, 1000);
 
				score_info_width += GetStringBoundingBox(STR_BLACK_COMMA).width + WD_FRAMERECT_LEFT;
 

	
 
				SetDParam(0, 100);
 
				SetDParamMaxValue(0, 100);
 
				this->bar_width = GetStringBoundingBox(STR_PERFORMANCE_DETAIL_PERCENT).width + 20; // Wide bars!
 

	
 
				/* At this number we are roughly at the max; it can become wider,
 
				 * but then you need at 1000 times more money. At that time you're
 
				 * not that interested anymore in the last few digits anyway.
 
				 * The 500 is because 999 999 500 to 999 999 999 are rounded to