changeset 18795:da04a2145938 draft

(svn r23643) -Fix [FS#4896]: dates cut off in the message history
author rubidium <rubidium@openttd.org>
date Tue, 20 Dec 2011 19:57:03 +0000
parents 639fe5bd5837
children 8a5b797fce61
files src/news_gui.cpp
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/news_gui.cpp
+++ b/src/news_gui.cpp
@@ -1037,7 +1037,9 @@
 			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.