From 49a4a5958dd903974d8c0785797f085926b4a97d Mon Sep 17 00:00:00 2001 From: peter1138 Date: Sat, 4 Oct 2014 18:13:10 +0000 Subject: (svn r26953) -Codechange: GUI-scale for company manager face on news popup. --- src/news_gui.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/news_gui.cpp b/src/news_gui.cpp index 7098b315b..75aa007e8 100644 --- a/src/news_gui.cpp +++ b/src/news_gui.cpp @@ -138,10 +138,7 @@ static const NWidgetPart _nested_company_news_widgets[] = { NWidget(NWID_HORIZONTAL), SetPadding(0, 1, 1, 1), NWidget(NWID_VERTICAL), NWidget(WWT_EMPTY, COLOUR_WHITE, WID_N_MGR_FACE), SetMinimalSize(93, 119), SetPadding(2, 6, 2, 1), - NWidget(NWID_HORIZONTAL), - NWidget(WWT_EMPTY, COLOUR_WHITE, WID_N_MGR_NAME), SetMinimalSize(93, 24), SetPadding(0, 0, 0, 1), - NWidget(NWID_SPACER), SetFill(1, 0), - EndContainer(), + NWidget(WWT_EMPTY, COLOUR_WHITE, WID_N_MGR_NAME), SetMinimalSize(93, 24), SetPadding(0, 0, 0, 1), NWidget(NWID_SPACER), SetFill(0, 1), EndContainer(), NWidget(WWT_EMPTY, COLOUR_WHITE, WID_N_COMPANY_MSG), SetFill(1, 1), SetMinimalSize(328, 150), @@ -316,6 +313,10 @@ struct NewsWindow : Window { { StringID str = STR_NULL; switch (widget) { + case WID_N_MGR_FACE: + *size = maxdim(*size, GetSpriteSize(SPR_GRADIENT)); + break; + case WID_N_MESSAGE: CopyInDParam(0, this->ni->params, lengthof(this->ni->params)); str = this->ni->string_id; @@ -374,7 +375,7 @@ struct NewsWindow : Window { case WID_N_MGR_FACE: { const CompanyNewsInformation *cni = (const CompanyNewsInformation*)this->ni->free_data; DrawCompanyManagerFace(cni->face, cni->colour, r.left, r.top); - GfxFillRect(r.left + 1, r.top, r.left + 1 + 91, r.top + 118, PALETTE_NEWSPAPER, FILLRECT_RECOLOUR); + GfxFillRect(r.left, r.top, r.right, r.bottom, PALETTE_NEWSPAPER, FILLRECT_RECOLOUR); break; } case WID_N_MGR_NAME: { -- cgit v1.2.3-70-g09d2