From 9e8b99042f77d2834b9a801b50f0f6a614e49e38 Mon Sep 17 00:00:00 2001 From: frosch Date: Thu, 3 Apr 2025 16:25:01 +0200 Subject: [PATCH] Codefix: SA_FORCE is needed to prevent DrawString from inverting alignment. --- src/graph_gui.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/graph_gui.cpp b/src/graph_gui.cpp index 398e2a874d..e3b89744b4 100644 --- a/src/graph_gui.cpp +++ b/src/graph_gui.cpp @@ -431,11 +431,11 @@ protected: if (rtl) { DrawString(r.right + ScaleGUITrad(4), r.right + label_width + ScaleGUITrad(4), y, GetString(STR_GRAPH_Y_LABEL, this->format_str_y_axis, y_label), - GRAPH_AXIS_LABEL_COLOUR, SA_RIGHT); + GRAPH_AXIS_LABEL_COLOUR, SA_RIGHT | SA_FORCE); } else { DrawString(r.left - label_width - ScaleGUITrad(4), r.left - ScaleGUITrad(4), y, GetString(STR_GRAPH_Y_LABEL, this->format_str_y_axis, y_label), - GRAPH_AXIS_LABEL_COLOUR, SA_RIGHT); + GRAPH_AXIS_LABEL_COLOUR, SA_RIGHT | SA_FORCE); } y_label -= y_label_separation; @@ -452,7 +452,7 @@ protected: if (rtl) { DrawStringMultiLine(x + x_sep, x, y, this->height, GetString(month == 0 ? STR_GRAPH_X_LABEL_MONTH_YEAR : STR_GRAPH_X_LABEL_MONTH, STR_MONTH_ABBREV_JAN + month, year), - GRAPH_AXIS_LABEL_COLOUR, SA_RIGHT); + GRAPH_AXIS_LABEL_COLOUR, SA_LEFT); } else { DrawStringMultiLine(x, x + x_sep, y, this->height, GetString(month == 0 ? STR_GRAPH_X_LABEL_MONTH_YEAR : STR_GRAPH_X_LABEL_MONTH, STR_MONTH_ABBREV_JAN + month, year),