summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2015-04-26 11:07:41 +0000
committerfrosch <frosch@openttd.org>2015-04-26 11:07:41 +0000
commit2639b843168b35819d532426682fbe05ba9f9865 (patch)
tree268cd30f1d7c64d33e5cc02e6f962f93cfc61dd3
parent7e12a1a9853d8467e48b14da7234c47e9456d69f (diff)
downloadopenttd-2639b843168b35819d532426682fbe05ba9f9865.tar.xz
(svn r27255) -Fix [FS#6270]: Combined button+dropdown widgets in order and autoreplace GUI had incorrect hitbox when using GUI zoom. (_dp_)
-rw-r--r--src/widget.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/widget.cpp b/src/widget.cpp
index 471840a41..a6176bd31 100644
--- a/src/widget.cpp
+++ b/src/widget.cpp
@@ -2524,10 +2524,10 @@ void NWidgetLeaf::Draw(const Window *w)
bool NWidgetLeaf::ButtonHit(const Point &pt)
{
if (_current_text_dir == TD_LTR) {
- int button_width = this->pos_x + this->current_x - 12;
+ int button_width = this->pos_x + this->current_x - NWidgetLeaf::dropdown_dimension.width;
return pt.x < button_width;
} else {
- int button_left = this->pos_x + 12;
+ int button_left = this->pos_x + NWidgetLeaf::dropdown_dimension.width;
return pt.x >= button_left;
}
}