# HG changeset patch # User peter1138 # Date 2008-05-26 10:28:59 # Node ID 57b3c1845ef4cab01687b86eb05f87d4346f0440 # Parent da246805e36413a58808e3e0297f4b10d0e1f04a (svn r13259) -Fix: Subsidy text could still overflow diff --git a/src/subsidy_gui.cpp b/src/subsidy_gui.cpp --- a/src/subsidy_gui.cpp +++ b/src/subsidy_gui.cpp @@ -118,11 +118,14 @@ struct SubsidyListWindow : Window { /* Displays the two offered towns */ SetupSubsidyDecodeParam(s, 1); - x2 = DrawStringTruncated(x + 2, y, STR_2027_FROM_TO, TC_FROMSTRING, width); + x2 = DrawStringTruncated(x + 2, y, STR_2027_FROM_TO, TC_FROMSTRING, width - 2); - /* Displays the deadline before voiding the proposal */ - SetDParam(0, _date - ymd.day + 384 - s->age * 32); - DrawStringTruncated(x2, y, STR_2028_BY, TC_FROMSTRING, width - x2); + if (width - x2 > 10) { + /* Displays the deadline before voiding the proposal */ + SetDParam(0, _date - ymd.day + 384 - s->age * 32); + DrawStringTruncated(x2, y, STR_2028_BY, TC_FROMSTRING, width - x2); + } + y += 10; num++; }