From d2358c5ea67e904c148dc856450d820eb16a5192 Mon Sep 17 00:00:00 2001 From: peter1138 Date: Wed, 18 Nov 2009 10:09:22 +0000 Subject: (svn r18160) -Codechange: The hyphen character may not line up in all fonts, so draw the Y-axis ticks manually. --- src/graph_gui.cpp | 5 +++-- src/lang/english.txt | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/graph_gui.cpp b/src/graph_gui.cpp index c359d52d2..98b3fcbcc 100644 --- a/src/graph_gui.cpp +++ b/src/graph_gui.cpp @@ -270,7 +270,7 @@ protected: * placed outside the area. */ r.top += 5 + GetCharacterHeight(FS_SMALL) / 2; r.bottom -= (this->month == 0xFF ? 1 : 3) * GetCharacterHeight(FS_SMALL) + 4; - r.left += 5; + r.left += 9; r.right -= 5; /* Start of with a highest_value of twice the height of the graph in pixels. @@ -312,6 +312,7 @@ protected: y = r.bottom; for (int i = 0; i < GRAPH_NUM_LINES_Y; i++) { + GfxFillRect(r.left - 3, y, r.left - 1, y, GRAPH_AXIS_LINE_COLOUR); GfxFillRect(r.left, y, r.right, y, grid_colour); y -= y_sep; } @@ -343,7 +344,7 @@ protected: for (int i = 0; i < GRAPH_NUM_LINES_Y; i++) { SetDParam(0, this->format_str_y_axis); SetDParam(1, y_label); - DrawString(r.left - label_width, r.left, y, STR_GRAPH_Y_LABEL, graph_axis_label_colour, SA_RIGHT); + DrawString(r.left - label_width - 4, r.left - 4, y, STR_GRAPH_Y_LABEL, graph_axis_label_colour, SA_RIGHT); y_label -= y_label_separation; y += y_sep; diff --git a/src/lang/english.txt b/src/lang/english.txt index 81c80027a..625700806 100644 --- a/src/lang/english.txt +++ b/src/lang/english.txt @@ -506,7 +506,7 @@ STR_GRAPH_KEY_BUTTON :{BLACK}Key STR_GRAPH_KEY_TOOLTIP :{BLACK}Show key to graphs STR_GRAPH_X_LABEL_MONTH :{TINYFONT}{STRING}{} {STRING} STR_GRAPH_X_LABEL_MONTH_YEAR :{TINYFONT}{STRING}{} {STRING}{}{NUM} -STR_GRAPH_Y_LABEL :{TINYFONT}{STRING2}- +STR_GRAPH_Y_LABEL :{TINYFONT}{STRING2} STR_GRAPH_Y_LABEL_NUMBER :{TINYFONT}{COMMA} STR_GRAPH_OPERATING_PROFIT_CAPTION :{WHITE}Operating Profit Graph -- cgit v1.2.3-70-g09d2