summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2009-07-15 23:04:26 +0000
committeralberth <alberth@openttd.org>2009-07-15 23:04:26 +0000
commit6767a598276032799fe172a66c4cf214e81b06e0 (patch)
tree967d74dc34ff9dde69ac6f94fdfbdb4e82858f57 /src
parent99215c5010ec0398ed7be71a026f48072878ade5 (diff)
downloadopenttd-6767a598276032799fe172a66c4cf214e81b06e0.tar.xz
(svn r16840) -Codechange: Small merge in town directory widget content method.
Diffstat (limited to 'src')
-rw-r--r--src/town_gui.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/town_gui.cpp b/src/town_gui.cpp
index fd2eb949a..9cf12bc94 100644
--- a/src/town_gui.cpp
+++ b/src/town_gui.cpp
@@ -647,14 +647,9 @@ public:
{
Dimension d = {0, 0};
switch (widget) {
- case TDW_SORTNAME: {
- d = GetStringBoundingBox(STR_SORT_BY_NAME);
- d.width += WD_SORTBUTTON_ARROW_WIDTH * 2; // Doubled since the word is centered, also looks nice.
- break;
- }
-
+ case TDW_SORTNAME:
case TDW_SORTPOPULATION: {
- d = GetStringBoundingBox(STR_SORT_BY_POPULATION);
+ d = GetStringBoundingBox(this->nested_array[widget]->widget_data);
d.width += WD_SORTBUTTON_ARROW_WIDTH * 2; // Doubled since the word is centered, also looks nice.
break;
}