tweak the size and layout of the cancel button a bit so it doesn't get clipped.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47940 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn 2007-08-07 21:44:02 +00:00
parent 5608bce45d
commit e6d0599dc7

View File

@ -540,7 +540,7 @@ void wxSearchCtrl::LayoutControls(int x, int y, int width, int height)
searchMargin = 0;
cancelMargin = 0;
}
wxCoord textWidth = width - sizeSearch.x - sizeCancel.x - searchMargin - cancelMargin;
wxCoord textWidth = width - sizeSearch.x - sizeCancel.x - searchMargin - cancelMargin - 1;
// position the subcontrols inside the client area
@ -1178,7 +1178,7 @@ void wxSearchCtrl::RecalcBitmaps()
m_cancelBitmap.GetWidth() != bitmapHeight
)
{
m_cancelBitmap = RenderCancelBitmap(bitmapHeight-BORDER,bitmapHeight-BORDER); // square
m_cancelBitmap = RenderCancelBitmap(bitmapHeight-BORDER-1,bitmapHeight-BORDER-1); // square
m_cancelButton->SetBitmapLabel(m_cancelBitmap);
}
// else this bitmap was set by user, don't alter