Fix search button height in generic wxSearchCtrl

Make this button of exactly the bitmap size instead of using the full
control height for it, even if/when the bitmap is smaller.

This fixes some random junk being shown in the bottom two pixels of the
search button sometimes: this was due to only redrawing the part covered
by the bitmap in wxSearchButton::OnPaint(), leaving the rest of the
button unpainted (because wxSearchButton uses wxBG_STYLE_PAINT).
This commit is contained in:
Vadim Zeitlin 2018-07-09 14:37:43 +02:00
parent 03b7491bea
commit 587e0d8e64

View File

@ -504,7 +504,7 @@ void wxSearchCtrl::LayoutControls()
// position the subcontrols inside the client area
m_searchButton->SetSize(x, (height - sizeSearch.y) / 2,
sizeSearch.x, height);
sizeSearch.x, sizeSearch.y);
x += sizeSearch.x;
x += searchMargin;