From 587e0d8e64e08d745f8acddaca6050879f2dd243 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 9 Jul 2018 14:37:43 +0200 Subject: [PATCH] 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). --- src/generic/srchctlg.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/generic/srchctlg.cpp b/src/generic/srchctlg.cpp index 3eba2795d5..c9ea71e5d2 100644 --- a/src/generic/srchctlg.cpp +++ b/src/generic/srchctlg.cpp @@ -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;