# HG changeset patch # User sbr # Date 1375531722 -7200 # Sat Aug 03 14:08:42 2013 +0200 # Node ID ee6229ebd4018eafac13a0e1851e12cd7f971e46 # Parent f29de5a997a759e15c052df98c7d74f770e3ee4a -Fix (r25623): In LinkGraphLegendWindow, center the company icon. diff --git a/src/linkgraph/linkgraph_gui.cpp b/src/linkgraph/linkgraph_gui.cpp --- a/src/linkgraph/linkgraph_gui.cpp +++ b/src/linkgraph/linkgraph_gui.cpp @@ -431,7 +431,7 @@ void LinkGraphLegendWindow::DrawWidget(c if (this->IsWidgetDisabled(widget)) return; CompanyID cid = (CompanyID)(widget - WID_LGL_COMPANY_FIRST); Dimension sprite_size = GetSpriteSize(SPR_COMPANY_ICON); - DrawCompanyIcon(cid, (r.left + r.right - sprite_size.width) / 2, (r.top + r.bottom - sprite_size.height) / 2); + DrawCompanyIcon(cid, CeilDiv((r.left + r.right - sprite_size.width), 2), (r.top + r.bottom - sprite_size.height) / 2); return; } if (IsInsideMM(widget, WID_LGL_SATURATION_FIRST, WID_LGL_SATURATION_LAST + 1)) {