summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTyler Trahan <tyler@tylertrahan.com>2021-02-18 04:15:58 -0500
committerGitHub <noreply@github.com>2021-02-18 10:15:58 +0100
commitd5e18feed93f9b99cceb6649e771b6f2aff42715 (patch)
tree1b08e59c89ee24d2f1cb5831f7b14f4db2f73c46 /src
parent27b4d6390b0a1c9f37b8ca6db9902b9271f93c9b (diff)
downloadopenttd-d5e18feed93f9b99cceb6649e771b6f2aff42715.tar.xz
Change: Darken graph grid lines for legibility (#8690)
Diffstat (limited to 'src')
-rw-r--r--src/graph_gui.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/graph_gui.cpp b/src/graph_gui.cpp
index ea38914ad..04c3a7581 100644
--- a/src/graph_gui.cpp
+++ b/src/graph_gui.cpp
@@ -165,7 +165,8 @@ struct ValuesInterval {
struct BaseGraphWindow : Window {
protected:
static const int GRAPH_MAX_DATASETS = 64;
- static const int GRAPH_AXIS_LINE_COLOUR = PC_BLACK;
+ static const int GRAPH_AXIS_LINE_COLOUR = GREY_SCALE(1);
+ static const int GRAPH_ZERO_LINE_COLOUR = GREY_SCALE(8);
static const int GRAPH_NUM_MONTHS = 24; ///< Number of months displayed in the graph.
static const int MIN_GRAPH_NUM_LINES_Y = 9; ///< Minimal number of horizontal lines to draw.
@@ -292,7 +293,7 @@ protected:
static_assert(GRAPH_MAX_DATASETS >= (int)NUM_CARGO && GRAPH_MAX_DATASETS >= (int)MAX_COMPANIES);
assert(this->num_vert_lines > 0);
- byte grid_colour = _colour_gradient[COLOUR_GREY][4];
+ byte grid_colour = GREY_SCALE(3);
/* Rect r will be adjusted to contain just the graph, with labels being
* placed outside the area. */
@@ -352,7 +353,7 @@ protected:
/* Draw the x axis. */
y = x_axis_offset + r.top;
- GfxFillRect(r.left, y, r.right, y, GRAPH_AXIS_LINE_COLOUR);
+ GfxFillRect(r.left, y, r.right, y, GRAPH_ZERO_LINE_COLOUR);
/* Find the largest value that will be drawn. */
if (this->num_on_x_axis == 0) return;