Made wxSearchCtrl look like other text controls under GTK+.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43957 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -224,7 +224,11 @@ bool wxSearchCtrl::Create(wxWindow *parent, wxWindowID id,
|
|||||||
const wxValidator& validator,
|
const wxValidator& validator,
|
||||||
const wxString& name)
|
const wxString& name)
|
||||||
{
|
{
|
||||||
|
#ifdef __WXGTK__
|
||||||
|
if ( !wxTextCtrlBase::Create(parent, id, pos, size, wxSUNKEN_BORDER | style, validator, name) )
|
||||||
|
#else
|
||||||
if ( !wxTextCtrlBase::Create(parent, id, pos, size, wxSIMPLE_BORDER | style, validator, name) )
|
if ( !wxTextCtrlBase::Create(parent, id, pos, size, wxSIMPLE_BORDER | style, validator, name) )
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -424,7 +428,10 @@ void wxSearchCtrl::LayoutControls(int x, int y, int width, int height)
|
|||||||
// position the subcontrols inside the client area
|
// position the subcontrols inside the client area
|
||||||
|
|
||||||
m_searchButton->SetSize(x, y + ICON_OFFSET, sizeSearch.x, height);
|
m_searchButton->SetSize(x, y + ICON_OFFSET, sizeSearch.x, height);
|
||||||
m_text->SetSize(x + sizeSearch.x + searchMargin, y + ICON_OFFSET, textWidth, height);
|
m_text->SetSize( x + sizeSearch.x + searchMargin,
|
||||||
|
y + ICON_OFFSET - BORDER,
|
||||||
|
textWidth,
|
||||||
|
height);
|
||||||
m_cancelButton->SetSize(x + sizeSearch.x + searchMargin + textWidth + cancelMargin,
|
m_cancelButton->SetSize(x + sizeSearch.x + searchMargin + textWidth + cancelMargin,
|
||||||
y + ICON_OFFSET, sizeCancel.x, height);
|
y + ICON_OFFSET, sizeCancel.x, height);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user