fix dropdown arrow clickable area in double/quad size

This commit is contained in:
Pavel Stupnikov
2015-03-29 18:38:14 +03:00
parent da0a1a75a0
commit f2a5775be4

View File

@@ -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;
}
}