summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2014-10-04 18:13:10 +0000
committerpeter1138 <peter1138@openttd.org>2014-10-04 18:13:10 +0000
commit49a4a5958dd903974d8c0785797f085926b4a97d (patch)
tree84f234a662702e9db89a055d7dda3cbdfdd5693c
parent1066a94b63731bf8d707cc1f31934f008de42afe (diff)
downloadopenttd-49a4a5958dd903974d8c0785797f085926b4a97d.tar.xz
(svn r26953) -Codechange: GUI-scale for company manager face on news popup.
-rw-r--r--src/news_gui.cpp11
1 files changed, 6 insertions, 5 deletions
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: {