Take wxBORDER_THEME, and the default border style, into account
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49910 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -413,13 +413,17 @@ void wxStdRenderer::DrawBorder(wxDC& dc,
|
|||||||
switch ( border )
|
switch ( border )
|
||||||
{
|
{
|
||||||
case wxBORDER_SUNKEN:
|
case wxBORDER_SUNKEN:
|
||||||
|
case wxBORDER_THEME:
|
||||||
DrawSunkenBorder(dc, &rect);
|
DrawSunkenBorder(dc, &rect);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
// wxBORDER_DOUBLE and wxBORDER_THEME are currently the same value.
|
||||||
|
#if 0
|
||||||
case wxBORDER_DOUBLE:
|
case wxBORDER_DOUBLE:
|
||||||
DrawAntiSunkenBorder(dc, &rect);
|
DrawAntiSunkenBorder(dc, &rect);
|
||||||
DrawExtraBorder(dc, &rect);
|
DrawExtraBorder(dc, &rect);
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
|
|
||||||
case wxBORDER_STATIC:
|
case wxBORDER_STATIC:
|
||||||
DrawStaticBorder(dc, &rect);
|
DrawStaticBorder(dc, &rect);
|
||||||
@@ -458,6 +462,7 @@ wxRect wxStdRenderer::GetBorderDimensions(wxBorder border) const
|
|||||||
|
|
||||||
case wxBORDER_RAISED:
|
case wxBORDER_RAISED:
|
||||||
case wxBORDER_SUNKEN:
|
case wxBORDER_SUNKEN:
|
||||||
|
case wxBORDER_THEME:
|
||||||
width = 2;
|
width = 2;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@@ -650,13 +650,14 @@ wxRect wxMonoRenderer::GetBorderDimensions(wxBorder border) const
|
|||||||
case wxBORDER_STATIC:
|
case wxBORDER_STATIC:
|
||||||
case wxBORDER_RAISED:
|
case wxBORDER_RAISED:
|
||||||
case wxBORDER_SUNKEN:
|
case wxBORDER_SUNKEN:
|
||||||
|
case wxBORDER_THEME:
|
||||||
width = 1;
|
width = 1;
|
||||||
break;
|
break;
|
||||||
|
/*
|
||||||
case wxBORDER_DOUBLE:
|
case wxBORDER_DOUBLE:
|
||||||
width = 2;
|
width = 2;
|
||||||
break;
|
break;
|
||||||
|
*/
|
||||||
default:
|
default:
|
||||||
wxFAIL_MSG(_T("unknown border type"));
|
wxFAIL_MSG(_T("unknown border type"));
|
||||||
// fall through
|
// fall through
|
||||||
|
@@ -145,6 +145,11 @@ bool wxWindow::Create(wxWindow *parent,
|
|||||||
long style,
|
long style,
|
||||||
const wxString& name)
|
const wxString& name)
|
||||||
{
|
{
|
||||||
|
// Get default border
|
||||||
|
wxBorder border = GetBorder(style);
|
||||||
|
style &= ~wxBORDER_MASK;
|
||||||
|
style |= border;
|
||||||
|
|
||||||
long actualStyle = style;
|
long actualStyle = style;
|
||||||
|
|
||||||
// we add wxCLIP_CHILDREN to get the same ("natural") behaviour under MSW
|
// we add wxCLIP_CHILDREN to get the same ("natural") behaviour under MSW
|
||||||
@@ -665,7 +670,7 @@ void wxWindow::OnSize(wxSizeEvent& event)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
if (HasFlag( wxSUNKEN_BORDER ) || HasFlag( wxRAISED_BORDER ))
|
if (HasFlag( wxSUNKEN_BORDER ) || HasFlag( wxRAISED_BORDER ) || HasFlag( wxBORDER_THEME ))
|
||||||
{
|
{
|
||||||
if (newSize.y > m_oldSize.y)
|
if (newSize.y > m_oldSize.y)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user