Added wxBORDER_THEME, wxWindow::GetDefaultBorderForControl(), wxWindow::CanApplyThemeBorder().
wxTextCtrl and wxSearchCtrl now get the correct border on wxMSW, and the wxRichTextCtrl sample also now demonstrates correct borders. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47927 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -301,11 +301,6 @@ bool wxTextCtrl::Create(wxWindow *parent,
|
||||
const wxValidator& validator,
|
||||
const wxString& name)
|
||||
{
|
||||
#ifdef __WXWINCE__
|
||||
if ((style & wxBORDER_MASK) == 0)
|
||||
style |= wxBORDER_SIMPLE;
|
||||
#endif
|
||||
|
||||
// base initialization
|
||||
if ( !CreateControl(parent, id, pos, size, style, validator, name) )
|
||||
return false;
|
||||
@@ -316,6 +311,17 @@ bool wxTextCtrl::Create(wxWindow *parent,
|
||||
return true;
|
||||
}
|
||||
|
||||
// returns true if the platform should explicitly apply a theme border
|
||||
bool wxTextCtrl::CanApplyThemeBorder() const
|
||||
{
|
||||
#ifdef __WXWINCE__
|
||||
return false;
|
||||
#else
|
||||
// Standard text control already handles theming
|
||||
return ((GetWindowStyle() & (wxTE_RICH|wxTE_RICH2)) != 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
bool wxTextCtrl::MSWCreateText(const wxString& value,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size)
|
||||
|
Reference in New Issue
Block a user