summaryrefslogtreecommitdiff
path: root/src/widget.cpp
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2009-07-02 21:18:22 +0000
committeralberth <alberth@openttd.org>2009-07-02 21:18:22 +0000
commit3c50a66cedfa1632cf151c9e7a031e042ffeb004 (patch)
tree717ed43758afab6af31dd8599f4b304691635fde /src/widget.cpp
parent7e852ab44698694044b09a98b942bde4b4827751 (diff)
downloadopenttd-3c50a66cedfa1632cf151c9e7a031e042ffeb004.tar.xz
(svn r16727) -Codechange: Introducing WD_SORTBUTTON_ARROW_WIDTH constant.
Diffstat (limited to 'src/widget.cpp')
-rw-r--r--src/widget.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/widget.cpp b/src/widget.cpp
index 390012879..73056788e 100644
--- a/src/widget.cpp
+++ b/src/widget.cpp
@@ -815,14 +815,14 @@ void Window::DrawSortButtonState(int widget, SortButtonState state) const
int offset = this->IsWidgetLowered(widget) ? 1 : 0;
int base, top;
if (this->widget != NULL) {
- base = offset + (_dynlang.text_dir == TD_LTR ? this->widget[widget].right - 11 : this->widget[widget].left);
+ base = offset + (_dynlang.text_dir == TD_LTR ? this->widget[widget].right - WD_SORTBUTTON_ARROW_WIDTH : this->widget[widget].left);
top = this->widget[widget].top;
} else {
assert(this->nested_array != NULL);
- base = offset + this->nested_array[widget]->pos_x + (_dynlang.text_dir == TD_LTR ? this->nested_array[widget]->current_x - 11 : 0);
+ base = offset + this->nested_array[widget]->pos_x + (_dynlang.text_dir == TD_LTR ? this->nested_array[widget]->current_x - WD_SORTBUTTON_ARROW_WIDTH : 0);
top = this->nested_array[widget]->pos_y;
}
- DrawString(base, base + 11, top + 1 + offset, state == SBS_DOWN ? DOWNARROW : UPARROW, TC_BLACK, SA_CENTER);
+ DrawString(base, base + WD_SORTBUTTON_ARROW_WIDTH, top + 1 + offset, state == SBS_DOWN ? DOWNARROW : UPARROW, TC_BLACK, SA_CENTER);
}