summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2011-12-20 19:57:03 +0000
committerrubidium <rubidium@openttd.org>2011-12-20 19:57:03 +0000
commitc5203c652e13100610155c3c9cde11bcc390ad36 (patch)
treed6e11e46964027f9a69090880ebec30899e4373c
parentdbb85e5cc173caacfffc93012b1c8d5f1becc162 (diff)
downloadopenttd-c5203c652e13100610155c3c9cde11bcc390ad36.tar.xz
(svn r23643) -Fix [FS#4896]: dates cut off in the message history
-rw-r--r--src/news_gui.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/news_gui.cpp b/src/news_gui.cpp
index 04347844c..7a11e03ec 100644
--- a/src/news_gui.cpp
+++ b/src/news_gui.cpp
@@ -1037,7 +1037,9 @@ struct MessageHistoryWindow : Window {
this->line_height = FONT_HEIGHT_NORMAL + 2;
resize->height = this->line_height;
- SetDParam(0, ConvertYMDToDate(ORIGINAL_MAX_YEAR, 12, 30));
+ /* Months are off-by-one, so it's actually 8. Not using
+ * month 12 because the 1 is usually less wide. */
+ SetDParam(0, ConvertYMDToDate(ORIGINAL_MAX_YEAR, 7, 30));
this->date_width = GetStringBoundingBox(STR_SHORT_DATE).width;
size->height = 4 * resize->height + this->top_spacing + this->bottom_spacing; // At least 4 lines are visible.